MCU Driver
MCU Driver
Component Documentation
1 - Mcu Integration Manual
Integration Manual
For
Mcu
VERSION: 2
DATE: 05/08/17
Prepared By:
Software Group,
Nexteer Automotive,
Saginaw, MI, USA
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
| Sl. No. | Description | Author | Version | Date |
| 1 | Initial version | Lucas Wendling | 1 | 01/06/16 |
| 2 | Update for compiler settings | Lucas Wendling | 2 | 05/08/17 |
Table of Contents
1 Abbrevations And Acronyms 4
2 References 5
3 Dependencies 6
3.1 SWCs 6
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 7
4.1 Build Time Config 7
4.2 Configuration Files to be provided by Integration Project 7
4.3 Da Vinci Parameter Configuration Changes 7
4.4 DaVinci Interrupt Configuration Changes 7
4.5 Manual Configuration Changes 7
5 Integration DATAFLOW REQUIREMENTS 8
5.1 Required Global Data Inputs 8
5.2 Required Global Data Outputs 8
5.3 Specific Include Path present 8
6 Runnable Scheduling 9
7 Memory Map REQUIREMENTS 10
7.1 Mapping 10
7.2 Usage 10
7.3 Non RTE NvM Blocks 10
7.4 RTE NvM Blocks 10
8 Compiler Settings 11
8.1 Preprocessor MACRO 11
8.2 Optimization Settings 11
9 Appendix 12
Abbrevations And Acronyms
References
This section lists the title & version of all the documents that are referred for development of this document
Dependencies
SWCs
Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.
Global Functions(Non RTE) to be provided to Integration Project
API usage and scheduling of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
Configuration REQUIREMeNTS
Configuration of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
Build Time Config
Configuration Files to be provided by Integration Project
N/A
Da Vinci Parameter Configuration Changes
DaVinci Interrupt Configuration Changes
| ISR Name | Notes |
| Patched_MCU_FEINT_ISR | The Mcu module implements an interrupt that needs a patch for a hardware problem that exists on the P1M hardware (see Renesas Technical Update TN-RH8-S001A/E). Nexteer has created the appropriate workaround that subsequently calls the third party Mcu interrupt handler code. Therefore, when configuring the Mcu interrupt in the O/S the interrupt handler name should be configured to the Nexteer code with the workaround (“Patched_MCU_FEINT_ISR”) instead of directly referencing the third party handler Mcu interrupt handler code. |
Manual Configuration Changes
Integration DATAFLOW REQUIREMENTS
Required Global Data Outputs
Specific Include Path present
Yes
Runnable Scheduling
API usage and scheduling of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
| Init | Scheduling Requirements | Trigger |
| | |
| Runnable | Scheduling Requirements | Trigger |
| | |
.
Memory Map REQUIREMENTS
Mapping
| Memory Section | Contents | Notes |
| | |
| | |
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
NvM Blocks
Compiler Settings
The MCAL related files require specific compiler toolchain settings to be used to match what the MCAL was developed and tested to. This is the following:
-c -Osize -g -cpu=rh850g3m -gsize -prepare_dispose -inline_prologue -sda=all -Wundef -no_callt -reserve_r2 --short_enum --prototype_errors --diag_error 193 -dual_debug -large_sda --no_commons -shorten_loads -shorten_moves -Wshadow -nofloatio -ignore_callt_state_in_interrupts -delete
This component’s .gpj file has been adapted to provide these options for the static files of this component. NOTE: The dynamic, generated files from this component need to be compiled with these options as well, and therefore the integration project will need to be adapted to provide these settings to the generated files in the integration project.
The following snippet can be adapted/added to the a batch file which creates the generate.gpj project for integration project usage:
for %%F in (../generate/<MCAL_Component>/src/*.c) do (
ECHO ..\generate/<MCAL_Component>/src\%%F >> generate.gpj
ECHO # MCAL BUILD OPTIONS # >> generate.gpj
ECHO -c >> generate.gpj
ECHO -Osize >> generate.gpj
ECHO -g >> generate.gpj
ECHO -cpu=rh850g3m >> generate.gpj
ECHO -gsize >> generate.gpj
ECHO -prepare_dispose >> generate.gpj
ECHO -inline_prologue >> generate.gpj
ECHO -sda=all >> generate.gpj
ECHO -Wundef >> generate.gpj
ECHO -no_callt >> generate.gpj
ECHO -reserve_r2 >> generate.gpj
ECHO --short_enum >> generate.gpj
ECHO --prototype_errors >> generate.gpj
ECHO --diag_error 193 >> generate.gpj
ECHO -dual_debug >> generate.gpj
ECHO -large_sda >> generate.gpj
ECHO --no_commons >> generate.gpj
ECHO -shorten_loads >> generate.gpj
ECHO -shorten_moves >> generate.gpj
ECHO -Wshadow >> generate.gpj
ECHO -nofloatio >> generate.gpj
ECHO -ignore_callt_state_in_interrupts >> generate.gpj
ECHO -delete >> generate.gpj
)
Preprocessor MACRO
Optimization Settings
Appendix
<This section is for appendix>
3 - R20UT3720EJ0101-AUTOSAR
AUTOSAR MCAL R4.0 User's Manual5 - R20UT3720EJ0101-AUTOSARs


AUTOSAR MCAL R4.0.3
User’s Manual
MCU Driver Component Ver.1.0.9
Embedded User’s Manual
Target Device:
RH850/P1x
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website
(http://www.renesas.com). www.renesas.com Rev.1.01 Feb 2017
2
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits,
software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses
and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents,
copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical
information described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application
examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas
Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas
Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration,
modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended
applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication
equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or
bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and
undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics
disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics
product for which the product is not intended by Renesas Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General
Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the
ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation
characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of
the use of Renesas Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas
Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the
possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics
products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your
products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the
final products or systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each
Renesas Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances,
including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all
these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your
noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or
sale is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or
technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction,
such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering
such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of
disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or
technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will
engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall
comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting
jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and
conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from
your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned
subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
3
4
Abbreviations and Acronyms Abbreviation / Acronym Description ADC
Analog to Digital Converter
ANSI
American National Standards Institute
API
Application Programming Interface
ARXML/arxml
AutosaR eXtensible Mark-up Language
ASIL
Automotive Safety Integrity Level
AUTOSAR
AUTomotive Open System ARchitecture
BSWMDT
Basic Software Module Description Template
CAN
Controller Area Network
CVM
Core Voltage Monitor
CLMA
Clock Monitor
CPU
Central Processing Unit
DEM/Dem
Diagnostic Event Manager
DET/Det
Development Error Tracer
DIO
Digital Input Output
DMA
Direct Memory Access
ECU
Electronic Control Unit
EEPROM
Electrically Erasable Programmable Read-Only Memory
ECM/Ecm
Error Control Module
GNU
GNU’s Not Unix
GPT
General Purpose Timer
HW
HardWare
ICU
Input Capture Unit
ID/Id
IDentifier
ISR
Interrupt Service Routine
I/O
Input and Output
LIN
Local Interconnect Network
MCAL
Microcontroller Abstraction Layer
MHz
Mega Hertz
MCU/Mcu
MicroController Unit
NA
Not Applicable
NMI
Non Maskable Interrupt
MI
Maskable Interrupt
OS/Os
Operating System
OSTM
Operating System Timer
PDF
Parameter Definition File
PWM
Pulse Width Modulation
PLL
Phase Locked Loop
RAM/Ram
Random Access Memory
Rev.
Revision
ROM
Read Only Memory
5
RTE
Run Time Environment
SchM
Scheduler Manager
SCI
Serial Communication Interface
SPI
Serial Peripheral Interface
SW
SoftWare
SWS
Software Specification
TAUD
Timer Array Unit D
WDT
WatchDog Timer
Definitions Term Represented by Configuration Description File
Input file to MCU Driver Generation Tool. It is generated by ECU
(.arxml)
Configuration Editor.
Project Makefile (.mak)
This file has the script that guides the make utility to choose the
appropriate program files that are to be compiled and linked together
Sl. No.
Serial Number
Translation XML File (.trxml)
This file contains the translation and device specific header file path.
6
Table of Contents Chapter 1 Introduction ..................................................................... 11 1.1. Document Overview ................................................................................................................ 13 Chapter 2 Reference Documents .................................................... 15 Chapter 3 Integration and Build Process ....................................... 17 3.1. MCU Driver Component Makefile ........................................................................................... 17 3.1.1 Folder Structure ....................................................................................................... 17 Chapter 4 Forethoughts ................................................................... 19 4.1. General...................................................................................................................................... 19 4.2. Preconditions ........................................................................................................................... 20 4.3. Data Consistency ..................................................................................................................... 21 4.4. User Mode and Supervisor Mode ........................................................................................... 23 4.5. Deviation List ........................................................................................................................... 24 4.6. RAM Initialization ..................................................................................................................... 24 4.7. Callout API ................................................................................................................................ 24 Chapter 5 Architecture Details ........................................................ 25 Chapter 6 Registers Details ............................................................. 27 Chapter 7 Interaction between the User and MCU Driver Component 39 7.1. Services Provided By MCU Driver Component To User ...................................................... 39 Chapter 8 MCU Driver Component Header And Source File Description 41 Chapter 9 Generation Tool Guide .................................................... 45 Chapter 10 Application Programming Interface .............................. 47 10.1. Imported Types ........................................................................................................................ 47 10.1.1. Standard Types ....................................................................................................... 47 10.1.2. Other Module Types ................................................................................................ 47 10.2. Type Definitions ....................................................................................................................... 47 10.2.1 Mcu_ClockType ....................................................................................................... 47 10.2.2 Mcu_RawResetType ............................................................................................... 47 10.2.3 Mcu_RamSectionType ............................................................................................ 48 10.2.4 Mcu_PllStatusTypes ................................................................................................ 48 10.2.5 Mcu_RamStateType ................................................................................................ 48 10.2.6 Mcu_ResetType ...................................................................................................... 48 7
10.2.7 Mcu_ClmaIndexType .............................................................................................. 50 10.2.8 Mcu_ModeType ...................................................................................................... 50 10.3. Function Definitions ................................................................................................................ 50 10.3.1. Mcu_Init ................................................................................................................... 51 10.3.2. Mcu_InitRamSection ............................................................................................... 51 10.3.3. Mcu_InitClock .......................................................................................................... 52 10.3.4. Mcu_DistributePllClock ........................................................................................... 52 10.3.5. Mcu_GetPllStatus .................................................................................................... 53 10.3.6. Mcu_GetResetReason ............................................................................................ 53 10.3.7. Mcu_GetResetRawValue ........................................................................................ 54 10.3.8. Mcu_PerformReset ................................................................................................. 54 10.3.9. Mcu_SetMode ......................................................................................................... 55 10.3.10. Mcu_GetVersionInfo ................................................................................................ 55 10.3.11. Mcu_GetRamState .................................................................................................. 56 10.3.12. Mcu_EcmReleaseErrorOutPin ................................................................................ 56 Chapter 11 Development And Production Error .............................. 57 11.1. MCU Driver Component Development Errors ....................................................................... 57 11.2. MCU Driver Component Production Errors .......................................................................... 58 Chapter 12 Memory Organization ..................................................... 61 Chapter 13 P1M Specific Information ............................................... 65 13.1. Interaction between the User and MCU Driver Component ................................................. 65 13.1.1. Translation Header File ........................................................................................... 65 13.1.2. ISR Function ............................................................................................................ 65 13.1.2.1 Interrupt routines for OS.......................................................................... 66 13.1.3. Parameter Definition File ......................................................................................... 67 13.2. Sample Application ................................................................................................................. 67 13.2.1 Sample Application Structure .................................................................................. 67 13.2.2 Building Sample Application .................................................................................... 69 13.2.2.1. Configuration Example ............................................................................ 69 13.2.2.2. Debugging the Sample Application ......................................................... 69 13.3. Memory and Throughput ........................................................................................................ 70 13.3.1. ROM/RAM Usage .................................................................................................... 70 13.3.2. Stack Depth ............................................................................................................. 71 13.3.3. Throughput Details .................................................................................................. 71 Chapter 14 Release Details ................................................................ 73 8
List of Figures Figure 1-1 System Overview Of AUTOSAR Architecture .......................................................... 11 Figure 1-2 System Overview Of The MCU Driver In AUTOSAR MCAL Layer .......................... 12 Figure 5-1 MCU Driver Architecture ........................................................................................... 25 Figure 12-1 MCU Driver Component Memory Organization ........................................................ 61 Figure 13-1 Overview of MCU Driver Sample Application ........................................................... 67 List of Tables
Table 4-1 MCU Driver Protected Resources List ..................................................................... 22 Table 4-2 Supervisor mode and User mode details .................................................................. 23 Table 4-3 MCU Driver Deviation List ......................................................................................... 24 Table 6-1 Register Details ......................................................................................................... 27 Table 8-1 Description of the MCU Driver Component Files ...................................................... 42 Table 10-1 API Provided by MCU Driver Component ................................................................. 50 Table 11-1 DET Errors of MCU Driver Component..................................................................... 57 Table 11-2 DEM Errors of MCU Driver Component .................................................................... 58 Table 13-1 ISR For MCU ............................................................................................................. 66 Table 13-2 PDF information for P1M .......................................................................................... 67 Table 13-3 ROM/RAM Details without DET ................................................................................ 70 Table 13-4 ROM/RAM Details with DET ..................................................................................... 71 Table 13-5 Throughput Details of the APIs ................................................................................. 71 9
10
Introduction Chapter 1
Chapter 1 Introduction The purpose of this document is to describe the information related to
MCU Driver Component for Renesas P1x microcontrollers.
This document shall be used as reference by the users of MCU Driver
Component. The system overview of complete AUTOSAR architecture
is shown in the below Figure:
Application Layer
AUTOSAR RTE
System Services
On board Device Abstraction
MCU Driver Microcontroller
Figure 1-1 System Overview of AUTOSAR Architecture
The MCU Driver is part of the Microcontroller Abstraction Layer (MCAL),
the lowest layer of Basic Software in the AUTOSAR environment.
11
Chapter 1 Introduction The Figure in the following page depicts the MCU Driver as part of layered
AUTOSAR MCAL Layer:
Microcontroller Drivers
Memory Drivers
Communication Drivers I/O Drivers
in
e
in
te
x
t
r
te
e
n
S
W
r
r
a
P
n
F
n
l
a
GP
MC
a
a
I
EEP
H
CA
LI
le
tc
C
RA
l
l
a
N
x
h
o
F
F
n
N Dr
R
T
U
d
l
re
M
la
a
d
D
I
P
RO
a
CU
A
D
o
D
D
P
g
s
s
le
W
r
y
DC
r
T
I
OR
r
T
h
h
i
r
v
i
i
O
v
D
iv
e
e
D
M
Dr
er
v
D
M
Dr
Dr
e
e
r
e
st
r
s
r
i
r
i
D
v
Dr
Dr
T
r
i
v
r
t
i
i
D
v
i
v
v
er
v
r
er
D
er
i
i
er
er
r
e
iv
i
v
v
v
r
e
e
e
r
ive
e
r
r
r
r
r
M
E
&
G
WDT
C Po
U
Cl
Micro- xt
F
E
l
E
L
PW
.
a
M
P
S
SCI
I
CA
IC
DIO
PT
n
B
i
o
s
R
N
C
PI
t
c
w
Controller u
h
O
N
U
M
D
s
k
or
A
er
Figure 1-2 System Overview Of The MCU Driver In AUTOSAR MCAL Layer The RTE provides the encapsulation of Hardware channels and basic
services to the Application Software Components. So it is possible to map the
Application Software-Components between different ECUs.
The Basic Software Modules are located below the RTE. The Basic Software
itself is divided into the subgroups: System Services, Memory,
Communication and I/O Hardware-Abstraction. The Complex Drivers are also
located below the RTE. Among others, the Operating System (OS), the
Watchdog manager and the Diagnostic services are located in the System
Services subgroup. The Memory subgroup contains modules to provide
access to the non-volatile memories, namely Flash and EEPROM. In the I/O
Hardware-Abstraction subgroup the whole MCU Driver Component is
provided.
On board Device Abstraction provides an interface to physical values for
AUTOSAR software components. It abstracts the physical origin of signals
(their paths to the hardware ports) and normalizes the signals with respect to
their physical appearance. The Microcontroller driver provides services for
basic microcontroller initialization, power down functionality, reset and
microcontroller specific functions required from the upper layers.
12
Introduction Chapter 1 1.1. Document Overview The document has been segmented for easy reference. The table below
provides user with an overview of the contents of each section:
Section Contents Section1 (Introduction)
This section provides an introduction and overview of MCU Driver
Component.
Section 2 (Reference Documents) This section lists the documents referred for developing this document.
Section 3 (Integration And Build
This section explains the folder structure, Makefile structure for MCU
Process)
Driver Component. This section also explains about the Makefile
descriptions, Integration of MCU Driver Component with other
components, building the MCU Driver Component along with a sample
application.
Section 4 (Forethoughts)
This section provides brief information about the MCU Driver
Component, the preconditions that should be known to the user before
it is used, data consistency details and deviation list.
Section 5 (Architecture Details)
This section describes the layered architectural details of the MCU Driver
Component.
Section 6 (Registers Details)
This section describes the register details of MCU Driver Component.
Section 7 (Interaction between
This section describes interaction of the MCU Driver Component with
The User And MCU Driver
the upper layers.
Component)
Section 8 (MCU Driver
This section provides information about the MCU Driver Component
Component Header And Source
source files is mentioned. This section also contains the brief note on
File Description)
the tool generated output file.
Section 9 (Generation Tool Guide) This section provides information on the MCU Driver Component Code
Generation Tool.
Section 10 (Application
This section explains all the APIs provided by the MCU Driver
Programming Interface)
Component.
Section 11 (Development And
This section lists the DET and DEM errors.
Production Errors)
Section 12 (Memory
This section provides the typical memory organization, which must be
Organization)
met for proper functioning of component.
Section 13 (P1M Specific
This section provides P1M specific information also the information
Information)
about linker compiler and sample application.
Section 14 (Release Details)
This section provides release details with version name and base
version.
13
Chapter 1 Introduction 14
Reference Documents Chapter 2 Chapter 2 Reference Documents Sl. No. Title Version 1.
AUTOSAR_SWS_MCUDriver.pdf
3.2.0
2.
r01uh0436ej0130-rh850p1x.pdf
1.30
3.
AUTOSAR_SWS_MemoryMapping.pdf
1.4.0
4.
AUTOSAR_SWS_PlatformTypes.pdf
2.5.0
5.
AUTOSAR_BSW_MakefileInterface.pdf
0.3
6.
AUTOSAR_SWS_CompilerAbstraction.pdf
3.2.0
7.
AUTOSAR BUGZILLA (http://www.autosar.org/bugzilla) -
Note: AUTOSAR BUGZILLA is a database, which contains concerns
raised against information present in AUTOSAR Specifications.
15
Chapter 2 Reference Documents 16
Integration and Build Process Chapter 3 Chapter 3 Integration and Build Process In this section the folder structure of the MCU Driver Component is explained.
Description of the Make files along with samples is provided in this section.
Remark The details about the C Source and Header files that are generated by the
MCU Driver Generation Tool are mentioned in the Generation Tool User’s
Manual “R20UT3721EJ0101-AUTOSAR.pdf”.
3.1. MCU Driver Component Makefile The Makefile provided with the MCU Driver Component consists of the GNU
Make compatible script to build the MCU Driver Component in case of any
change in the configuration. This can be used in the upper level Makefile (of
the application) to link and build the final application executable.
3.1.1 Folder Structure The files are organized in the following folders:
Remark Trailing slash ‘\’ at the end indicates a folder
X1X\P1x\modules\mcu\src
\Mcu.c
\Mcu_Irq.c
\Mcu_Ram.c
\Mcu_Version.c
X1X\P1x\modules\mcu\include
\Mcu.h
\Mcu_Debug.h
\Mcu_Irq.h
\Mcu_PBTypes.h
\Mcu_Ram.h
\Mcu_Types.h
\Mcu_Version.h
\Mcu_RegWrite.h
X1X\P1x\modules\mcu\sample_application\<SubVariant>\make\<compiler>
\App_MCU_P1M_Sample.mak
X1X\P1x\modules\mcu\sample_application\<SubVariant>\obj\<Complier>
X1X\P1x\modules\mcu\generator
\Mcu_P1x.dll
\R403_MCU_P1x_BSWMDT.arxml
X1X\P1x\common_family\generator
\Global_Application_P1x.trxml
\Sample_Application_P1x.trxml
\P1x_translation.h
17
Chapter 3 Integration and Build Process \Test_Application_P1x.trxml
X1X\P1x\modules\mcu\user_manual
(User manuals will be available in this folder)
Following stubs are required for the successful compilation of MCU module:
X1X\common_platform\generic\stubs\4.0.3\Dem
\include\Dem.h
\include\ Dem_Cfg.h
\src\Dem.c
\make\dem_defs.mak
\make\dem_rules.mak
\xml\Dem_Mcu.arxml
X1X\common_platform\generic\stubs\4.0.3\Det
\includeDet.h
\src\Det.c
\make\det_defs.mak
\make\det_rules.mak
X1X\common_platform\generic\stubs\4.0.3\Os
\include\Os.h
\make\os_defs.mak
X1X\common_platform\generic\stubs\4.0.3\SchM
\include\Rte.h
\include\SchM_Mcu.h
\src\SchM_Mcu.c
\make\rte_defs.mak
\make\rte_rules.mak
Note: 1. <Complier> can be ghs.
2. <AUTOSAR_version> should be 4.0.3.
3. <SubVariant> can be P1M.
18
Forethoughts Chapter 4 Chapter 4 Forethoughts 4.1. General Following information will aid the user to use the MCU Driver Component
software efficiently:
• The MCU Driver does not enable or disable the ECU or Microcontroller
power supply. The upper layer should handle this operation.
• The start-up code is ECU and MCU specific. MCU Driver does
not implement the start-up code.
• MCU specific initializations such as reset registers, one time writable
registers, interrupt stack pointer, user stack pointer and MCU internal
watchdog, MCU specific features of internal memory and registers are not
implemented by MCU Driver. These initializations should be implemented
by the start-up code.
• MCU Driver does not implement any call-back notification functions.
• MCU Driver does not implement scheduled functions.
• The MCU Driver component is implemented as a Post build variant.
• MCU Driver depends on Scheduler and Wake-up source service Modules
for disabling all relevant interrupts to protect writing into the protected
registers and invoking the ECU state manager functions.
• In P1x PLL clocks are not configurable and it cannot be controlled by
software. It works with default values after main oscillator activated.
Hence in P1x Mcu driver code Mcu_DistributePllClock() and
Mcu_GetPllStatus()API's none of the action are taken care except DET
errors.
• The file Interrupt_VectorTable.c provided is just a Demo and not all
interrupts will be mapped in this file. So the user has to update the
Interrupt_VectorTable.c as per his configuration
• The container 'McuResetReasonConf' is not used for implementation. Since
this is coming under the published information and specific to hardware &
implementation, the user must not allowed to configure/rename this. So the
other vendor specific containers are introduced here to achieve the same
functionality. These containers have multiplicity 1 - 1 and have fixed values
depends on the reset type.
• The reset reason information from HW registers shall be cleared after
reading and processing the information, in order to avoid multiple reset
reasons. This should be done in the APIs Mcu_GetResetReason() and
Mcu_GetResetRawValue().
• If the RAM init feature is enabled the API Mcu_InitRamSection follows this
procedure:
• Initialize the RAM section.
• Unmask the maskable interrupts enabled for RAM error signals
(within ECM).
The procedure requires that the complete RAM is initialized before the RAM
state functionality is used.
• If the RAM init feature is not enabled the unmasking of maskable interrupts
19
Chapter 4 Forethoughts enabled for RAM error signals (within ECM) will be handled in API
Mcu_Init().
If McuRamSectorSetting = FALSE, the local RAM error sources will be
configured as part of Mcu_Init API. If McuRamSectorSetting = TRUE, the
local RAM error sources will be configured as part of Mcu_InitRamSection
API.
• The accesses to HW registers is possible only in the low level driver layer.
The MCAL user does never write or read directly from any register, but uses
the AUTOSAR standard API provided by the MCAL.
• The default value for the parameter 'McuLoopCount' is ‘5’. The user shall
configure the parameter 'McuLoopCount' to standard default value ‘5’ for
avoiding unwanted reporting of DEM due to stabilization issues. The
maximum value of this parameter 'McuLoopCount' is '255'.
• The parameter McuEcmDelayTimerOverflowValue specifies to configure the
overflow value for the ECM delay timer. This value will be compared with
ECM delay timer register. The ECM delay timer uses high speed peripheral
clock signal for counting.
• The parameter McuEcmErrorOutputMode used to configure the error output
mode either in Dynamic or Non-Dynamic. If this parameter is configured as
dynamic and parameter McuEcmErrorOutTimer is enabled, OSTM1 output
will be used. If the parameter McuEcmErrorOutTimer is disabled, channel 15
in TAUD1 will be used. User should configure timer channels
(OSTM1/TAUD1) outside the MCU driver .If timer is not configured, it will
affect the expected output behavior of Dynamic Mode.
• Back up RAM0 (BURAM0) is used in the startup self-test
procedure.BURAM0 shall not be shared with other peripherals.
• If the parameter McuStartUpSWResetTest or McuStartUpECMResetTest is
configured as true, reset will happen during initialisation.
• For handling Non-Maskable interrupts asm code is used to access system
registers. User does not have permission to alter the asm code
• McuCvmDiagLockBit needs to be set to TRUE when using in ASIL
applications
• If there are more than one interrupt with same priority setting across multiple
MCAL modules, the interrupts are invoked as per the priority of the
microcontroller interrupt vector table.
•
The functions/variables with "STATIC" as pilot tag, provides an indication to
the compiler that the function/variable following this tag is a static type, so
the scope of static functions/variables is restricted to the file where they are
declared. User should take care of the tag name with respect to compiler
used.
4.2. Preconditions Following preconditions have to be adhered by the user, for proper
functioning of the MCU Driver Component:
•
The Mcu_Cfg.h, Mcu_Cbk.h and Mcu_Reg.h files generated by the MCU
Driver component Code Generation Tool must be compiled and linked
along with MCU Driver component source files.
• The application has to be rebuilt, if there is any change in the Mcu_Cfg.h file
20
Forethoughts Chapter 4 generated by the MCU Driver component Generation Tool.
• File Mcu_PBcfg.c generated for single configuration set or multiple
configuration sets using MCU Driver component Generation Tool can
be compiled and linked independently.
• The authorization of the user for calling the software triggering of a
hardware reset is not checked in the MCU Driver. This is the responsibility
of the upper layer.
• The MCU Driver component needs to be initialized before accepting
any request. The API Mcu_Init should be called by the ECU State
Manager Module to initialize MCU Driver Component.
The user should ensure that MCU Driver component API requests
are invoked in the correct and expected sequence and with correct
input arguments.
• Input parameters are validated only when the static configuration
parameter MCU_DEV_ERROR_DETECT is enabled. Application should
ensure that the right parameters are passed while invoking the APIs when
MCU_DEV_ERROR_DETECT is disabled.
• There are different clock settings possible. For more details, please refer
the respective device specific component user manual.
• If the handle of clock setting passed to the API Mcu_InitClock is not
configured to any one of the supported clock settings, then the
Development Error Detection function is invoked if the static configuration
parameter MCU_DEV_ERROR_DETECT is enabled.
• The MCU Driver initializes the clock generator as per the required
configuration settings and provides the configured clock sources for the
peripherals as applicable. It is the responsibility of the individual drivers to
select and initialize the respective driver specific registers as required for
their functionality with reference to the clock source provided by the MCU
Driver.
• The API Mcu_InitClock is implemented considering its invocation at run
time. Hence, there is a possibility of change in the baud rate set by the
peripheral drivers if the clock setting is different. Hence, the initialization of
the respective drivers after the invocation of Mcu_InitClock, is the
responsibility of the user of MCU Driver services.
•
A mismatch in the version numbers of header and the source files results in
compilation error. User should ensure that the correct versions of the header
and the source files are used.
•
User must ensure that the Mcu_Init shall be called only once after power on
or after reset, as there is no de-intialization function. Calling Mcu_Init() twice
with no reset in between is an invalid call sequence.
4.3. Data Consistency To support the re-entrance and interrupt services, the MCU Driver will ensure
the data consistency while accessing its own RAM storage or hardware
registers or to prevent any interrupts between the two write instructions of the
write protected register and the corresponding write enable register.
The MCU Driver will use SchM_Enter_Mcu_<Exclusive Area> and
SchM_Exit_Mcu_<Exclusive Area> functions.
The SchM_Enter_Mcu_<Exclusive Area> function is called before the data
needs to be protected and SchM_Exit_Mcu_<Exclusive Area> function is
21
Chapter 4 Forethoughts called after the data is accessed.
The flowchart will indicate the flow with the precompile option
“McuCriticalSectionProtection” enabled.
The following exclusive area along with scheduler services is used to provide
data integrity for shared resources:
MCU_REGISTER_PROTECTION
MCU_VARIABLE_PROTECTION
The functions SchM_Enter_Mcu_<Exclusive Area> and SchM_Exit_Mcu
_<Exclusive Area> can be disabled by disabling the configuration parameter
‘McuCriticalSectionProtection’.
The MCU module will use below macro for exclusive area.
#define MCU_ENTER_CRITICAL_SECTION(Exclusive_Area) \
SchM_Enter_Mcu_##Exclusive_Area()
#define MCU_EXIT_CRITICAL_SECTION(Exclusive_Area) \
SchM_Exit_Mcu_##Exclusive_Area()
Table 4-1 MCU Driver Protected Resources List API Name Exclusive Area Type Protected Resources HW Registers:
MCU_REGISTER_PROTECTION ECMMESSTR0
ECMESSTC0
IMR0
Mcu_Init
ECMDTMCTL
MCU_REGISTER_PROTECTION HW Registers:
ECMESSTC0
ECMMESSTR0
ECMESSTC1
Mcu_InitRamSection
ECMMESSTR1
MCU_VARIABLE_PROTECTION
Global variable
Mcu_GblRAMInitStatus
Mcu_GetRamState
protected.
Note: The worst case critical section value is 7.575 microseconds for MCU_FEINT_ISR.
22
Forethoughts Chapter 4
4.4. User Mode and Supervisor Mode The below table specifies the APIs which can run in user mode, supervisor
mode or both modes
Table 4-2 Supervisor mode and User mode details Sl.No. API Name User Mode Supervisor Known limitation in User Mode mode 1.
Mcu_Init
-
x
1. The enabling of the
interrupt will not be
possible.
2. Critical section protection
cannot be enabled
2.
Mcu_InitRamSection
x
x
Critical section protection
cannot be enabled
3.
Mcu_InitClock
x
x
-
4.
Mcu_DistributePllClock
x
x
-
5.
Mcu_GetPllStatus
x
x
-
6.
Mcu_GetResetReason
x
x
-
7.
Mcu_GetResetRawValue
x
x
-
8.
Mcu_PerformReset
x
x
-
9.
Mcu_SetMode
x
x
-
10.
Mcu_GetRamState
x
x
Critical section protection
cannot be enabled
11.
Mcu_LockStepSelfDiagnosticTest
x
x
Critical section protection
cannot be enabled
12.
Mcu_CvmSelfDiagnosticTest
x
x
-
13.
Mcu_ClmaSelfDiagnosticTest
x
x
-
14.
Mcu_EcmSelfDiagnosticTest
x
x
Critical section protection
cannot be enabled
15.
Mcu_SaveResetReason
x
x
Critical section protection
cannot be enabled
Note: Implementation of Critical Section is not dependent on MCAL. Hence Critical Section is
not considered to the entries for User mode in the above table.
23
Chapter 4 Forethoughts 4.5. Deviation List Table 4-3 MCU Driver Deviation List Sl. No. Description AUTOSAR Bugzilla / Mantis 1.
The parameter McuResetSetting from the
-
sub-container McuModuleConfiguration is
not considered.
2.
The MCU Driver considers the parameters of
-
RAM section configuration as pre-compile
parameters, since the number of RAM settings
are not known and hence the generation of
handles is not possible at post-build-time.
3.
The sub-container McuClockReferencePoint in
-
the Clock setting configuration is not used as
the reference frequencies specific to various
peripheral devices need to be published by
MCU Driver component.
4.
The parameter McuClockSettingId range in
54536
McuClockSettingConfig container is changed
from “1 to 255” to “0 to 255” since 0 is valid
minimum value for clock setting ID.
5.
If an invalid database is passed as a
-
parameter to API Mcu_Init, DET Error code
MCU_E_INVALID_DATABASE is reported to
DET.
4.6. RAM Initialization RAM initialization done by an API call to Mcu_InitRamSection must not
overwrite other memory sections of static variables. A dedicated memory
section shall be defined in linker directive file.
4.7. Callout API The MCU_RESET_CALLOUT() API is the call out API from the Mcu
module which will be called by Mcu_PerformReset() API for the software
reset when configuration parameter McuSwResetCall Api is true. This
callout API needs to be filled by user to do the software reset. If the
configuration parameter McuSwResetCall Api is false, the callout shall not
be available and the software reset shall be handled by the MCU itself
using HW feature of the SW reset.
24


Architecture Details Chapter 5 Chapter 5 Architecture Details The MCU Driver architecture is shown in the following figure. The MCU user
shall directly use the APIs to configure and execute the MCU conversions:
Application Software (MCU user)
MCU Driver
On-Chip Registers
On-Chip Hardware
Figure 5-1 MCU Driver Architecture The MCU driver accesses the microcontroller hardware directly and is located
in the MCAL. MCU component provides the functionalities related to PLL
Initialization, Clock Initialization and Distribution, RAM sections Initialization,
PreScaler Initialization, MCU reduced Power Modes Activation and MCU
Reset Activation and Reason.
The component consists of the following sub modules based on the
functionality:
• Initialization
• Self-Diagnostic test for ECM, CVM, Clock Monitor and Lock Step.
• Clock Initialization
• RAM sections Initialization and Status Verification
• MCU Reset Activation and Reason
• Version Information
Initialization This sub module provides the structures and APIs for both global and
controller specific initialization. MCU specific initialization is necessary in
order to ensure different startup behaviors of the microcontroller. This sub
25
Chapter 5 Architecture Details module also checks if the data base is flashed.
Self-Diagnostic test for ECM, CVM, Clock Monitor and Lock Step
This functionality is provided as part MCU module initialization.
Self-diagnostic test for ECM error source is helpful to check the ECM error
output signal by creating the real ECM error signal.
Self-diagnostic test for CVM and CLMA is possible in real scenario.
Clock Initialization The clock initialization sub module provides the functionality for generating all
the required clock signals for microcontroller operation from any one of the
available sources. It enables the provision for individual clock source
selection for CPU and groups of peripherals.
This sub module also provides the functionality for obtaining various
frequencies required for individual peripheral devices.
For available clock sources, please refer to the respective device specific
component user manual.
RAM sections Initialization and Status Verification This sub module provides the functionality for initializing the RAM with the any
given value, at the selected blocks of the RAM and to verify the status of RAM.
MCU Reset Activation and Reason The microcontroller reset activation will be performed by forcing a software
reset. This functionality will be done by using software reset register. ECM
error sources can also be configured for internal reset so that if any error
occurs device will activate reset.
To provide the reset reason, this sub module captures the information
available with RESF – Reset factor register. This register contains
information.
Version Information This module provides APIs for reading Module Id, Vendor Id and vendor
specific version numbers.
26
Registers Details Chapter 6 Chapter 6 Registers Details This section describes the register details of MCU Driver Component.
Table 6-1 Register Details Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits rw
ECMIRCFG0
32
-
MCU_IRCFG0_INIT_VALUE
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
rw
MCU_ECM_ERROUT_TIMER,
ECMEPCTL
8
-
MCU_ZERO
Mcu_GpConfi
w
gPtr-
CVMDEW
8
-
>ucCvmIndic
ationReg
w
PROTCMDCVM
32
-
MCU_WRITE_DATA
r
PROTSCVM
32
-
-
ulCvmResetE
w
CVMREN
32
LulCntValue
nableReg
ucCvmIndicati
r
LucCVMCntValue |
CVMDE
8
onReg
MCU_THREE
Mcu_Init
w
CVMFC
8
-
MCU_CVM_FACTOR_CLEAR
r
CVMF
8
-
MCU_ZERO
r
MCU_ZERO
RESF
32
-
MCU_ONE
MCU_THREE
rw
MCU_LONG_WORD_ZERO
BRAMDAT0
32
-
MCU_LONG_WORD_ONE
MCU_LONG_WORD_TWO
rw
ECMIRCFG0
32
-
MCU_ECM029_MASK_VALUE
rw
SWRESA
32
-
MCU_RES_CORRECT_VAL
w
PROT1PHCMD
32
-
MCU_WRITE_DATA
r
PROT1PS
32
-
-
r
ECMPS
8
-
-
LulEcmPseud
w
ECMPE0
32
-
oData
27
Chapter 6 Registers Details
Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits w
ECMPCMD1
32
-
MCU_WRITE_DATA
w
RESFC
32
-
MCU_RESF_CLEAR
w
MCU_ECMMESSTR0_FULL_
ECMESSTC0
32
-
MASK
r
ECMMESSTR0
32
-
MCU_LONG_WORD_ONE
r
POF
32
-
MCU_POF_RST
w
POFC
32
-
MCU_POF_CLEAR
r
RESF
32
-
MCU_ZERO
w
RESFC
32
-
MCU_RESF_CLEAR
r
CVMF
8
-
MCU_THREE
w
CVMFC
8
LucWriteData
-
Mcu_GpEcm
r
Setting-
ECMMESSTR0
32
>ulEcmIntern
-
alResetReg0v
alue
Mcu_GpEcm
r
Setting-
ECMMESSTR1
32
>ulEcmIntern
-
alResetReg1v
alue
Mcu_GpConfi
rw
gPtr-
LVICNT
32
MCU_LVI_MASK
>ulLVIindicati
onReg
Mcu_GpConfi
rw
gPtr-
LVICNT
32
MCU_LVI_MASK
>ulLVIindicati
onReg
w
PROT1PHCMD
32
-
MCU_WRITE_DATA
r
PROT1PS
32
-
-
w
ECMPCMD1
32
-
MCU_WRITE_DATA
w
ECMCPCMD0
32
-
MCU_WRITE_DATA
ECMMPCMD
w
32
-
MCU_WRITE_DATA
0
28
Registers Details Chapter 6 Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits w
ECMMECLR
8
-
MCU_ONE
w
ECMCECLR
8
-
MCU_ONE
w
ECMESSTC0
8
-
MCU_ECM029_MASK_VALUE
r
ECMMESSTR0
32
-
MCU_ZERO
r
ECMPS
8
-
-
rw
(MCU_ECMEMK0 |
ECMEMK0
32
-
MCU_ECM029_MASK_VALUE
)
rw
(MCU_ECMMICFG0 &
ECMMICFG0
32
-
(~MCU_ECM029_MASK_VAL
UE))
rw
(MCU_ECMNMICFG0 &
ECMNMICFG0
32
-
(~MCU_ECM029_MASK_VAL
UE))
rw
(MCU_ECMIRCFG0 &
ECMIRCFG0
32
-
(~MCU_ECM029_MASK_VAL
UE))
TESTCOMPRE
rw
(~MCU_LOCKSTEP_DUMMY_
32
-
G1
VALUE)
TESTCOMPRE
rw
MCU_LOCKSTEP_DUMMY_V
32
-
G0
ALUE
r
ECMMESSTR0
32
-
MCU_TWO
w
ECMESSTC0
32
-
MCU_TWO
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
LpEcmSetting
rw
-
ECMEMK0
32
>ulEcmError
-
MaskReg0Val
ue
LpEcmSetting
rw
-
ECMEMK1
32
>ulEcmError
-
MaskReg1Val
ue
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
29
Chapter 6 Registers Details
Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits LulEcmPseud
w
ECMESSTC0
32
-
oData
LulEcmPseud
w
ECMPE0
32
-
oData
rw
ECMEMK0
32
-
MCU_ECM029_MASK_VALUE
LulEcmPseud
r
ECMMESSTR0
32
oData
w
ECMPCMD1
32
-
MCU_WRITE_DATA
LulEcmPseud
r
ECMMESSTR1
32
-
oData
r
ECMPS
8
-
-
r
ECMCESSTR0
32
-
-
LulEcmPseud
w
ECMPE1
32
MCU_ERROROUT_STATUS
oData
LulEcmPseud
w
ECMESSTC1
32
-
oData
LulEcmPseud
r
ECMMESSTR1
32
-
oData
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMCESSTR1
32
-
-
r
ECMPS
8
-
-
r
CVMF
8
-
MCU_ZERO
rw
CVMDMASK
8
-
MCU_ONE
w
CVMFC
8
-
MCU_CVM_FACTOR_CLEAR
r
CVMF
8
-
MCU_ZERO
r/w
CVMDIAG
8
-
-
rw
EIBD8
32
-
MCU_EIBD08_CPU1_VALUE
rw
IMR0EIMK8
32
-
MCU_ENABLE_INTERRUPT
rw
ECMEPCFG
8
-
-
30
Registers Details Chapter 6 Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits r
ECMPS
8
-
-
w
ECMPCMD1
32
-
LpEcmSetting
rw
-
ECMMICFG0
32
>ulEcmMaskI
-
nterReg0valu
e
LpEcmSetting
rw
-
ECMMICFG1
32
>ulEcmMaskI
-
nterReg1valu
e
LpEcmSetting
rw
-
ECMNMICFG0
32
>ulEcmNonM
-
askInterReg0
value
LpEcmSetting
rw
-
ECMNMICFG1
32
>ulEcmNonM
-
askInterReg1
value
LpEcmSetting
rw
-
ECMIRCFG0
32
>ulEcmIntern
-
alResetReg0v
alue
LpEcmSetting
rw
-
ECMIRCFG1
32
>ulEcmIntern
-
alResetReg1v
alue
LpEcmSetting
rw
-
ECMEMK0
32
>ulEcmError
-
MaskReg0Val
ue
LpEcmSetting
rw
-
ECMEMK1
32
>ulEcmError
-
MaskReg1Val
ue
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
w
MCU_ECM_DELY_TIMER_ST
ECMDTMCTL
8
-
OP
rw
MCU_ECM_DLYTIMER_VALU
ECMDTMCMP
16
-
E
31
Chapter 6 Registers Details
Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
LpEcmSetting
rw
-
ECMDTMCFG0
32
>ulEcmDelay
-
TimerReg0Va
lue
LpEcmSetting
rw
-
ECMDTMCFG1
32
>ulEcmDelay
-
TimerReg1Va
lue
LpEcmSetting
rw
-
ECMDTMCFG2
32
>ulEcmDelay
-
TimerReg2Va
lue
LpEcmSetting
rw
-
ECMDTMCFG3
32
>ulEcmDelay
-
TimerReg3Va
lue
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
ECMMESSTR
r
MCU_ECMMESSTR0_FULL
32
-
0
_MASK
w
MCU_ECMMESSTR0_FULL
ECMESSTC0
32
-
_MASK
w
ECMPCMD1
32
-
MCU_WRITE_DATA
ECMMESSTR
r
MCU_ECMMESSTR1_FULL
32
-
1
_MASK
w
MCU_ECMMESSTR1_FULL
ECMESSTC1
32
-
_MASK
r
ECMPS
8
-
-
ECMMESSTR
r
32
-
MCU_RAM_MASK0_VALUE
0
w
ECMESSTC0
32
-
MCU_RAM_MASK0_VALUE
Mcu_InitRamSecti
on
ECMMESSTR
r
32
-
MCU_RAM_MASK1_VALUE
1
w
ECMESSTC1
32
-
MCU_RAM_MASK1_VALUE
32
Registers Details Chapter 6 Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
LpEcmSetti
rw
ng-
ECMMICFG0
32
>ulEcmMas
-
kInterReg0
value
LpEcmSetti
rw
ng-
ECMMICFG1
32
>ulEcmMas
-
kInterReg1
value
LpEcmSetti
rw
ng-
ECMNMICFG
32
>ulEcmNon
-
0
MaskInterR
eg0value
LpEcmSetti
rw
ng-
ECMNMICFG
32
>ulEcmNon
-
1
MaskInterR
eg1value
LpEcmSetti
rw
ng-
ECMIRCFG0
32
>ulEcmInter
-
nalResetRe
g0value
LpEcmSetti
rw
ng-
ECMIRCFG1
32
>ulEcmInter
-
nalResetRe
g1value
LpEcmSetti
rw
ng-
ECMEMK0
32
>ulEcmErro
-
rMaskReg0
Value
LpEcmSetti
rw
ng-
ECMEMK1
32
>ulEcmErro
-
rMaskReg1
Value
w
ECMPCMD1
32
-
MCU_WRITE_DATA
r
ECMPS
8
-
-
rw
CLKD0DIV
32
-
MCU_ZERO
Mcu_InitClock
rw
CKSC0CTL
32
-
MCU_LONG_WORD_ZERO
33
Chapter 6 Registers Details
Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits r
Mcu_GpClo
ckSetting-
CSC0STAT
32
>ucExtClk0
-
SelectedSr
cClock
rw
CLKD1DIV
32
-
MCU_ZERO
rw
CKSC1CTL
32
-
MCU_LONG_WORD_ZERO
r
Mcu_GpClo
ckSetting-
CSC1STAT
32
>ucExtClk1
-
SelectedSr
cClock
r
MCU_CLKOUT_ACTIVE_SY
CLKD0STAT
32
-
NC
Mcu_GpClo
r
ckSetting-
MCU_CLKOUT_ACTIVE_SY
CLKD1STAT
32
>ulExternal
NC
Clk1Divider
PROT1PHCM
w
32
-
MCU_WRITE_DATA
D
r
PROT1PS
32
-
-
Mcu_GpClo
rw
ckSetting-
CLKD0DIV
32
-
>ulExternal
Clk0Divider
r
MCU_CLKOUT_ACTIVE_SY
CLKD0STAT
32
-
NC
rw
CLKD1DIV
32
-
-
Mcu_GpClo
r
ckSetting-
MCU_CLKOUT_ACTIVE_SY
CLKD1STAT
32
>ulExternal
NC
Clk1Divider
Mcu_GpClo
rw
ckSetting-
ADCKSC0CT
32
>ucAdcClk
-
L
SelectCtrlR
egValue
(Mcu_GpCl
r
ockSetting-
ADCKSC0ST
32
>ucAdcClk
MCU_CLOCK_ACTIVE
AT
SelectCtrlR
egValue) |
PROT1PHCM
w
32
-
MCU_WRITE_DATA
D
34
Registers Details Chapter 6 Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits r
PROT1PS
32
-
-
LpClmaCon
rw
figPtr-
CLMA0CMPH
16
>usCLMAn
-
CMPHValu
e
LpClmaCon
rw
figPtr-
CLMA0CMPL
16
-
>usCLMAn
CMPLValue
w
CLMA0PCMD
8
-
MCU_WRITE_DATA
r
CLMA0PS
8
-
-
rw
CLMA0CTL0
8
-
MCU_ONE
LpClmaConfi
rw
gPtr-
CLMA1CMPH
16
-
>usCLMAnC
MPHValue
LpClmaConfi
rw
gPtr-
CLMA1CMPL
16
-
>usCLMAnC
MPLValue
w
CLMA1PCMD
8
-
MCU_WRITE_DATA
r
CLMA1PS
8
-
-
rw
CLMA1CTL0
8
-
MCU_ONE
LpClmaConfi
rw
gPtr-
CLMA2CMPH
16
-
>usCLMAnC
MPHValue
LpClmaConfi
rw
gPtr-
CLMA2CMPL
16
-
>usCLMAnC
MPLValue
w
CLMA2PCMD
8
-
MCU_WRITE_DATA
r
CLMA2PS
8
-
-
rw
CLMA2CTL0
8
-
MCU_ONE
LpClmaConfi
rw
gPtr-
CLMA3CMPH
16
-
>usCLMAnC
MPHValue
LpClmaConfi
rw
CLMA3CMPL
16
-
gPtr-
35
Chapter 6 Registers Details
Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits >usCLMAnC
MPLValue
w
CLMA3PCMD
8
-
MCU_WRITE_DATA
r
CLMA3PS
8
-
-
rw
CLMA3CTL0
8
-
MCU_ONE
CLMA_SELF
rw
MCU_FOUR
CLMATEST
32
_TEST_VALU
MCU_TWO
E
MCU_ZERO
LpClmaConfi
r
CLMATESTS
32
gPtr-
>enClmaIdx
w
PROT1PHCMD
32
-
MCU_WRITE_DATA
r
PROT1PS
32
-
-
Mcu_DistributePllClo
-
-
-
-
-
ck
-
Mcu_GetPllStatus
-
-
-
-
Mcu_GetResetReas
-
-
-
-
-
on
Mcu_GetResetRaw
-
-
-
-
-
Value
rw
SWRESA
32
-
MCU_RES_CORRECT_VAL
w
Mcu_PerformReset
PROT1PHCMD
32
-
MCU_WRITE_DATA
r
PROT1PS
32
-
-
-
Mcu_SetMode
-
-
-
-
-
Mcu_GetRamState
-
-
-
-
w
ECMPCMD1
32
-
MCU_WRITE_DATA
w
ECMCPCMD0
32
-
MCU_WRITE_DATA
w
ECMMPCMD0
32
-
MCU_WRITE_DATA
Mcu_EcmReleaseEr
rorOutPin
w
ECMMECLR
8
-
MCU_ONE
w
ECMCECLR
8
-
MCU_ONE
w
ECMESSTC0
8
-
MCU_ECM029_MASK_VALUE
36
Registers Details Chapter 6 Register Register Access Config Access API Name Registers Used 8/16/32 Parameter r/w/rw Macro/Variable bits r
ECMMESSTR0
32
-
MCU_ZERO
r
ECMPS
8
-
-
r
ECMMESSTR
MCU_ECMMESSTR0_FULL
32
-
0
_MASK
w
MCU_ECMMESSTR0_FULL
ECMESSTC0
32
-
_MASK
w
ECMPCMD1
32
-
MCU_WRITE_DATA
ECMMESSTR
r
MCU_ECMMESSTR1_FULL
32
-
1
_MASK
w
MCU_ECMMESSTR1_FULL
ECMESSTC1
32
-
_MASK
r
ECMPS
8
-
-
r
CVMF
8
-
MCU_ZERO
rw
CVMDMASK
8
-
MCU_ONE
w
CVMFC
8
-
MCU_CVM_FACTOR_CLEAR
w
PROTCMDCVM
32
-
MCU_WRITE_DATA
r
PROTSCVM
32
-
-
From above table the Register write verification is implemented for following list of registers:
ECMMESSTR0
ECMMESSTR1
ECMIRCFG0
CVMDE
CVMF
CVMDMASK
CVMDIAG
CLMAnCTL0
CLMATEST
ECMEMK0
ECMEMK1
POF
37
Chapter 6 Registers Details
RESFC
ADCKSC0CTL
CLMAnCMPH
CLMAnCMPL
CLMAnCTL0
ECMDTMCTL
ECMDTMR
ECMEPCFG
CKSCnCTL
38
Interaction between the User and MCU Driver Component Chapter 7 Chapter 7 Interaction between the User and MCU Driver Component The details of the services supported by the MCU Driver Component to the
upper layers users and the mapping of the channels to the hardware units is
provided in the following sections:
7.1. Services Provided By MCU Driver Component To User The MCU Driver Component provides the following functions to upper layers,
if supported by hardware:
•
To Perform the Self diagnostic test for the ECM, CVM, Clock Monitor and
Lock step.
• To initialize the RAM and to verify the status, section wise.
• To initialize the MCU specific clock options.
• To activate the specific clock to the MCU clock distribution.
• To read the reset type from the hardware.
• To perform the micro controller reset.
• To read the MCU Driver component version information.
• To clear the ERROROUT pin.
39
Chapter 7 Interaction between the User and MCU Driver Component
40
MCU Driver Component Header And Source File Description Chapter 8 Chapter 8 MCU Driver Component Header And Source File Description This section explains the MCU Driver Component’s C Source and C Header
files. These files have to be included in the project application while
integrating with other modules.
The C header file generated by MCU Driver Generation Tool:
• Mcu_Cfg.h
• Mcu_Reg.h
• Mcu_Cbk.h
The C source file generated by MCU Driver Generation Tool:
• Mcu_PBcfg.c
The MCU Driver Component C header files:
• Mcu.h
• Mcu_Debug.h
• Mcu_Irq
• Mcu_PBTypes.h
• Mcu_Ram.h
• Mcu_Types.h
• Mcu_Version.h
• Mcu_RegWrite.h
The MCU Driver Component source files:
• Mcu.c
• Mcu_Irq.c
• Mcu_Ram.c
• Mcu_Version.c
The Stub C header files:
• Compiler.h
• Compiler_Cfg.h
• MemMap.h
• Platform_Types.h
• rh850_Types.h
• Dem.h
• Dem_Cfg.h
• Det.h
• SchM_Mcu.h
• Os.h
• Rte.h
41
Chapter 8 MCU Driver Component Header And Source File Description The description of the MCU Driver Component files is provided in the table
below:
Table 8-1 Description of the MCU Driver Component Files File Details Mcu_Cfg.h
This file is generated by the MCU Driver Module Code
Generation Tool for MCU Driver Module pre-compile time
parameters. The macros and the parameters generated will
vary with respect to the configuration in the input ARXML file.
Mcu_Reg.h
This file contains the definitions for addresses of the hardware
registers used in the MCU Driver Module.
Mcu_Cbk.h
This file contains the extern declaration of call back functions
used in the MCU Driver Module.
Mcu_PBcfg.c
This file contains post-build configuration data. The structures
related to MCU Initialization, clock and power mode setting are
provided in this file. Data structures will vary with respect to
parameters configured.
Mcu.h
This file provides extern declarations for all the MCU Driver
Module APIs. This file provides service Ids of APIs, DET Error
codes and type definitions for MCU Driver initialization
structure. This header file shall be included in other modules to
use the features of MCU Driver Module.
Mcu_Irq.h
This file contains the ISR functions prototypes of the MCU
Driver Module.
Mcu_Types.h
This file provides data structure and type definitions for
initialization of MCU Driver.
Mcu_PBTypes.h
This file contains the macros used for the post build time
parameters.
Mcu_Ram.h
This file contains the extern declarations for the global variables
that are defined in Mcu_Ram.c file and the version information
of the file.
Mcu_Version.h
This file contains the macros of AUTOSAR version numbers of
all modules that are interfaced to MCU.
Mcu_Debug.h
This file provides Provision of global variables for debugging
purpose.
Mcu_RegWrite.h
This file provides macro definitions for the registers write verify.
Mcu.c
This file contains the implementation of all MCU Driver Module
APIs.
Mcu_Irq.c
This file contains the ISR functions of the MCU Driver Module.
Mcu_Ram.c
This file contains the global variables used by MCU Driver
Module.
Mcu_Version.c
This file contains the code for checking version of all modules
that are interfaced to MCU.
Compiler.h
Provides compiler specific (non-ANSI) keywords. All mappings
of keywords, which are not standardized, and/or compiler
specific are placed and organized in this compiler specific
header.
Compiler_Cfg.h
This file contains the memory and pointer classes.
MemMap.h
This file allows mapping of variables, constants and code of
modules to individual memory sections. Memory mapping can
be modified as per ECU specific needs.
Platform_Types.h
This file provides provision for defining platform and compiler
dependent types.
rh850_Types.h
This file provides macros to perform supervisor mode (SV) write
enabled Register ICxxx and IMR register writing using
OR/AND/Direct operation
42
MCU Driver Component Header And Source File Description Chapter 8 File Details Dem.h
This file contains declaration of DEM event id, status and version
macros.
Dem_Cfg.h
This file contains macro DEM event id numbers and version macros.
Det.h
This file contains structure for DET errors with module id, instance id,
Api id and error id as elements and version macros.
Schm_Mcu.h
This file provide a stub for SchM component.
Os.h
This file contains Os timer related declarations and version macros.
Rte.h
This file contains version macros.
43
Chapter 8 MCU Driver Component Header And Source File Description 44
Generation Tool Guide Chapter 9 Chapter 9 Generation Tool Guide For more information on the MCU Driver Component Generation Tool, please
refer “R20UT3721EJ0101-AUTOSAR.pdf”.
45
Chapter 9 G eneration Tool Guide
46
Application Programming Interface Chapter 10 Chapter 10 Application Programming Interface This section explains the Data types and APIs provided by the MCU Driver
Component to the Upper layers.
10.1. Imported Types This section explains the Data types imported by the MCU Driver Component
and lists its dependency on other modules.
10.1.1. Standard Types In this section all types included from the Std_Types.h are listed:
• Std_ReturnType
• Std_VersionInfoType
10.1.2. Other Module Types In this chapter all types included from the Dem.h are listed:
• Dem_EventIdType
• Dem_EventStatusType
10.2. Type Definitions This section explains the type definitions of MCU Driver Component
according to AUTOSAR Specification.
For more type definitions refer the SWS of MCU driver as mentioned in
chapter 2.
10.2.1 Mcu_ClockType Name: Mcu_ClockType
Type: uint8
Range: 1 to 2
Description: Type definition for Mcu_ClockType used by the API Mcu_InitClock.
10.2.2 Mcu_RawResetType Name: Mcu_RawResetType
Type: uint32
Range: 0 to 4294967295
Description: Type definition for Mcu_RawResetType used by the API Mcu_GetResetRawValue.
Note: Mcu_GetResetRawValue API is returning the RESF register status.
47
Chapter 10 Application Programming Interfac e
10.2.3 Mcu_RamSectionType Name: Mcu_RamSectionType
Type: uint8
Range: 0 to 255
Description: Type definition for Mcu_RamSectionType used by the API Mcu_InitRamSection.
10.2.4 Mcu_PllStatusTypes Name: Mcu_PllStatusType
Type: Enumeration
MCU_PLL_LOCKED
PLL is locked
MCU_PLL_UNLOCKED
PLL is unlocked.
Range: MCU_PLL_STATUS_UNDEFINED
PLL status is unknown
Description: Status value returned by the API Mcu_GetPllStatus.
Note: As per CPU manual Mcu_GetPllStatus API is not supporting the PLL clock implementation.
Hence Mcu_GetPllStatus is returning always MCU_PLL_LOCKED Status.
10.2.5 Mcu_RamStateType Following are the type definitions which are specific to R4.0 used by the MCU
Driver module:
Name: Mcu_RamStateType
Type: Enumeration
MCU_RAMSTATE_INVALID RAM State is invalid.
Range: MCU_RAMSTATE_VALID
RAM State is valid.
Description: Status value returned by the API Mcu_GetRamState
10.2.6 Mcu_ResetType Name: Mcu_ResetType
Type: Enumeration
Range: MCU_POWER_ON_CLEAR_RST
MCU_PIN_RST
MCU_SW_RST
MCU_WDT_RST
MCU_LOCK_STEP_CORE_RST
MCU_CLMA0_UPPER_LIMIT_RST
MCU_CLMA0_LOWER_LIMIT_RST
MCU_CLMA2_UPPER_LIMIT_RST
MCU_CLMA2_LOWER_LIMIT_RST
MCU_CLMA1_UPPER_LIMIT_RST
MCU_CLMA1_LOWER_LIMIT_RST
MCU_CLMA3_UPPER_LIMIT_RST
48
Application Programming Interface Chapter 10 MCU_CLMA3_LOWER_LIMIT_RST
MCU_LRAM_ECC2_ADDPTY_RST
MCU_GRAM_ECC2_ADDPTY_RST
MCU_CASHE_RAM_ECC2_RST
MCU_CFLH_ECC2_ADDPTY_RST
MCU_DATA_FLSH_ECC2_RST
MCU_DTS_RAM_ECC2_RST
MCU_CSIH_RAM_ECC2_RST
MCU_CAN_RAM_ECC2_RST
MCU_FLXR_RAM_ECC2_RST
MCU_MODE0_RST
MCU_MODE1_RST
MCU_MODE2_RST
MCU_PEGUARD_RST
MCU_GRAM_GUARD_RST
MCU_PBUSGUARD_RST
MCU_SAR_ADC_PTY_RST
MCU_DATA_PRTY_RST
MCU_ECM_COMP_RST
MCU_LVI_RST
MCU_TEMP_SENSE_RST
MCU_DMA_TRANSF_RST
MCU_DMA_REG_PROTECT_RST
MCU_LRAM_ECC1_PTY_RST
MCU_GRAM_ECC1_RST
MCU_CFLH_ECC1_RST
MCU_DATA_FLSH_ECC1_RST
MCU_DTS_RAM_ECC1_RST
MCU_ALL_PERI_RAM_ECC1_RST
MCU_BIST_ECC1_RST
MCU_BIST_ECC2_RST
MCU_FACI_TRANSF_RST
MCU_ECM_DELY_OVRFLW_RST
MCU_RESET_UNDEFINED
MCU_RESET_UNKNOWN
Description: Type of reset supported by the hardware
Note: 1. All RAM related ECM error sources are enabled for maskable interrupts only after Ram
initialization.
2. User should configure only one ECM event for each ECM error source at a time priority
level for the ECM event should be as follow:
Internal Reset
Maskable Interrupt
Non Maskable Interrupt
49
Chapter 10 Application Programming Interfac e
10.2.7 Mcu_ClmaIndexType Name: Mcu_ClmaIndexType
Type: Enumeration
MCU_CLMA0
CLMA0
Range: MCU_CLMA1
CLMA1
MCU_CLMA2
CLMA2
MCU_CLMA3
CLMA3
Description: Variable of this type is used to pass in Mcu_ClmaSelfDiagnosticTest API
10.2.8 Mcu_ModeType Name: Mcu_ModeType
Type: uint8
Range: 0 to 2
Description: Type definition for Mcu_ModeType used by the API Mcu_SetMode.
Note: As per CPU Manual Mcu_SetMode API is not supporting for any standby mode.
Hence the Mcu_ModeType parameter is unused for P1x MCU module implementation.
10.3. Function Definitions
Table 10-1 API Provided by MCU Driver Component
Sl. No API’s name 1.
Mcu_Init
2.
Mcu_InitRamSection
3.
Mcu_InitClock
4.
Mcu_DistributePllClock
5.
Mcu_GetPllStatus
6.
Mcu_GetResetReason
7.
Mcu_GetResetRawValue
8.
Mcu_PerformReset
9.
Mcu_SetMode
10.
Mcu_GetRamState
11.
Mcu_GetVersionInfo
12.
Mcu_EcmReleaseErrorOutPin
50
Application Programming Interface Chapter 10 10.3.1. Mcu_Init Name: Mcu_Init
FUNC(void, MCU_PUBLIC_CODE) Mcu_Init (P2CONST(Mcu_ConfigType,
Prototype: AUTOMATIC, MCU_APPL_CONST) ConfigPtr)
Service ID: 0x00
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Mcu_ConfigType
ConfigPtr
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: void
NA
Description: This service performs initialization of the MCU Driver component.
Configuration None
Dependency: Preconditions: None
10.3.2. Mcu_InitRamSection Name: Mcu_InitRamSection
FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitRamSection
Prototype: Mcu_RamSectionType RamSection)
Service ID: 0x01
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Mcu_RamSectionType
RamSection
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Std_ReturnType
E_OK, E_NOT_OK
Description: This function initializes the RAM section as provided from the configuration structure.
Configuration None
Dependency: Preconditions: None
51
Chapter 10 Application Programming Interface 10.3.3. Mcu_InitClock Name: Mcu_InitClock
FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitClock
Prototype: (Mcu_ClockType ClockSetting)
Service ID: 0x02
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Mcu_ClockType
ClockSetting
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Std_ReturnType
E_OK, E_NOT_OK
Description: This service initializes the PLL and other MCU specific clock options.
Configuration None
Dependency: Preconditions: None
10.3.4. Mcu_DistributePllClock Name: Mcu_DistributePllClock
FUNC(void, MCU_PUBLIC_CODE) Mcu_DistributePllClock (void)
Prototype: Service ID: 0x03
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Void
NA
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: void
NA
Description: This service activates the PLL clock to the MCU clock distribution
Configuration None
Dependency: Preconditions: None
52
Application Programming Interface Chapter 10 10.3.5. Mcu_GetPllStatus Name: Mcu_GetPllStatus
FUNC(void, MCU_PUBLIC_CODE) Mcu_GetPllStatus (void)
Prototype: Service ID: 0x04
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range Parameters In: Void
NA
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Mcu_PllStatusType
MCU_PLL_LOCKED = 0,
MCU_PLL_STATUS_UNDEFINED
Description: This service provides the lock status of the PLL
Configuration None
Dependency: Preconditions: None
10.3.6. Mcu_GetResetReason Name: Mcu_GetResetReason
Prototype: FUNC(Mcu_ResetType, MCU_PUBLIC_CODE) Mcu_GetResetReason (void)
Service ID: 0x05
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range Parameters In: Void
NA
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Mcu_ResetType
Values are read from hardware register and mentioned in file
Mcu_Types.h
Description: The function reads the rese t type from the hardware
Configuration None
Dependency: Preconditions: None
53
Chapter 10 Application Programming Interface 10.3.7. Mcu_GetResetRawValue Name: Mcu_GetResetRawValue
Prototype: FUNC(Mcu_RawResetType, MCU_PUBLIC_CODE) Mcu_GetResetRawValue (void)
Service ID: 0x06
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range Parameters In: Void
NA
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Mcu_RawResetType
32-bit value from hardware register
Description: The service return reset type value from the hardware register
Configuration None
Dependency: Preconditions: None
10.3.8. Mcu_PerformReset Name: Mcu_PerformReset
FUNC (void, MCU_PUBLIC_CODE) Mcu_PerformReset (void)
Prototype: Service ID: 0x07
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Void
NA
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: None
None
Description: This service provides microcontroller reset by accessing the Software reset register
Configuration None
Dependency: Preconditions: None
54
Application Programming Interface Chapter 10 10.3.9. Mcu_SetMode Name: Mcu_SetMode
FUNC (void, MCU_PUBLIC_CODE) Mcu_SetMode (void)
Prototype: Service ID: 0x08
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: Mcu_ModeType
McuMode
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: None
None
Description: This service activates the MCU power modes
Configuration None
Dependency: Preconditions: None
10.3.10. Mcu_GetVersionInfo Name: Mcu_GetVersionInfo
FUNC(void, MCU_PUBLIC_CODE) Mcu_GetVersionInfo (Std_VersionInfoType*
Prototype: versioninfo)
Service ID: 0x09
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range Parameters In: None
None
NA
Parameters InOut: None
NA
NA
Parameters out: versioninfo
Pointer to where to store the version
NA
information of this module
Type Possible Return Values Return Value: None
None
Description: This service returns the version information of this module
Configuration None
Dependency: Preconditions: None
55
Chapter 10 Application Programming Interfac e
10.3.11. Mcu_GetRamState Name: Mcu_GetRamState
FUNC(Mcu_RamStateType, MCU_PUBLIC_CODE) Mcu_GetRamState (void)
Prototype: Service ID: 0x0A
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range Parameters In: None
None
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Mcu_RamStateType
MCU_RAMSTATE_VALID = 0,
MCU_RAMSTATE_INVALID
Description: This service provides the a
ctual status of the microcontroller RAM area
Configuration None
Dependency: Preconditions: None
10.3.12. Mcu_EcmReleaseErrorOutPin Name: Mcu_EcmReleaseErrorOutPin
Prototype: FUNC(void, MCU_PUBLIC_CODE) Mcu_EcmReleaseErrorOutPin(void)
Service ID: 0x0B
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Parameters In: None
None
NA
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: None
None
Description: This is a vendor specific API. This service releases the ERROROUT pin of P1M
microcontroller.
Configuration None
Dependency: Preconditions: None
56
Development And Production Error Chapter 11 Chapter 11 Development And Production Error In this section the development errors that are reported by the MCU Driver
Component are tabulated. The development errors will be reported only when
the pre-compiler option McuDevErrorDetect is enabled in the configuration.
The production code errors are not supported by MCU Driver Component.
11.1. MCU Driver Component Development Errors The following table contains the DET errors that are reported by MCU Driver
Component. These errors are reported to Development Error Tracer Module
when the MCU Driver Component APIs are invoked with wrong input
parameters or without initialization of the driver.
Table 11-1 DET Errors of MCU Driver Component Sl. No. 1 Error Code
MCU_E_PARAM_CONFIG
Related API(s)
Mcu_Init
Source of Error
When the API service is called without module initialization.
Sl. No. 2 Error Code
MCU_E_PARAM_CLOCK
Related API(s)
Mcu_InitClock
Source of Error
When Clock Setting is not within the settings defined in the configuration data
structure.
Sl. No. 3 Error Code
MCU_E_PARAM_RAMSECTION
Related API(s)
Mcu_InitRamSection
Source of Error
When RamSection is not within the sections defined in the configuration data structure.
Sl. No. 4 Error Code
MCU_E_PLL_NOT_LOCKED
Related API(s)
Mcu_DistributePllClock
Source of Error
When PLL is not locked.
Sl. No. 5 Error Code
MCU_E_UNINIT
Related API(s)
Mcu_InitRamSection, Mcu_InitClock, Mcu_DistributePllClock, Mcu_GetPllStatus,
Mcu_GetResetReason, Mcu_GetResetRawValue, Mcu_PerformReset,
Mcu_SetMode, Mcu_GetRamState
Source of Error
When the APIs are invoked without the initialization of the MCU Driver Component.
Sl. No. 6 Error Code
MCU_E_INVALID_DATABASE
Related API(s)
Mcu_Init
Source of Error
When the API is invoked with no database.
57
Chapter 11 Development And Production Error Sl. No. 7 Error Code
MCU_E_PARAM_MODE
Related API(s)
Mcu_SetMode
Source of Error
When the API is invoked with invalid MCU mode.
11.2. MCU Driver Component Production Errors In this section the DEM errors identified in the MCU Driver component are
listed. MCU Driver component reports these errors to DEM by invoking
Dem_ReportErrorStatus API. This API is invoked, when the processing of the
given API request fails.
Table 11-2 DEM Errors of MCU Driver Component Sl. No. 1 Error Code
MCU_E_CLOCK_FAILURE
Related API(s)
Mcu_InitClock
Source of Error
When there is failure of the monitored clock frequency.
Sl. No. 2 Error Code
MCU_E_WRITE_TIMEOUT_FAILURE
Related API(s)
Mcu_PerformReset, Mcu_ProtectedWrite
Source of Error
When writing to a write-protected register fails
Sl. No. 3 Error Code
MCU_E_CVM_SELFDIAG_FAILURE
Related API(s)
Mcu_CvmSelfDiagnosticTest
Source of Error
When there is failure CVM self-diagnostic test.
Sl. No. 4
Error Code
MCU_E_CLM_SELFDIAG_FAILURE
Related API(s)
Mcu_ClmaSelfDiagnosticTest
Source of Error
When there is failure CLMA self-diagnostic test.
Sl. No. 5
Error Code
MCU_E_ECM_SELFDIAG_FAILURE
Related API(s)
Mcu_EcmSelfDiagnosticTest
Source of Error
When there is failure ECM self-diagnostic test.
Sl. No. 6 Error Code
MCU_E_LOCKSTEP_SELFDIAG_FAILURE
Related API(s)
Mcu_LockStepSelfDiagnosticTest
Source of Error
When there is failure Lock step self-diagnostic test.
Sl. No. 7 Error Code
MCU_E_RESETCONTROLLER_STARTUP_FAILURE
Related API(s)
Mcu_StartUPTest
Source of Error
When there is failure in startup test.
Sl. No. 8 Error Code
MCU_E_INT_INCONSISTENT
Related API(s)
MCU_ECM_EIC_ISR
58
Development And Production Error Chapter 11 Source of Error
When there is failure in interrupt consistency check.
Sl. No. 9 Error Code
MCU_E_REG_WRITE_VERIFY
Related API(s)
All APIs
Source of Error
When there is a failure in Register write.
59
Chapter 11 Development And Production Error 60






















Memory Organization Chapter 12 Chapter 12 Memory Organization Following picture depicts a typical memory organization, which must be met
for proper functioning of MCU Driver Component software.
ROM Section MCU Driver Component RAM ect Library Object es MCU Driver code related to APIs is placed in
Global RAM of unspecific size required for
this memory.
MCU driver functioning.
X1 Y1 Segment Name:
Segment Name:
MCU PUBLIC_CODE_ROM NO_INIT_RAM_UNSPECIFIED MCU Driver code related to internal
Global 1-bit RAM initialized by MCU Driver.
functions are placed in this memory
X2 Segment Name:
Segment Name:
Y2 NO_INIT_RAM_1BIT MCU_PRIVATE_CODE_ROM MCU Driver code related to ISR functions are
Global 1-bit RAM to be initialized by start-
are placed in this memory
up code
X3 Y3 Segment Name:
Segment Name:
MCU_START_SEC_CODE_FAST RAM_1BIT Global 32-bit RAM initialized by MCU
Driver.
Y4 Segment Name:
NO_INIT_RAM_32BIT Global 32-bit RAM to be initialized by start-
up code
Y5 Segment Name:
RAM_32BIT Tool Generated Files The const section (other than
MCU Configuration structure) in the file
X4 Mcu_PBcfg.c is placed in this memory
Segmentname:
MCU_CFG_DATA_UNSPECIFIED
Figure 12-1 MCU Driver Component Memory Organization 61
Chapter 12 Memory Organization ROM Section (X1, X2, X3 and X4): MCU_PUBLIC_CODE_ROM (X1): API(s) of MCU Driver Component, which
can be located in code memory.
MCU_PRIVATE_CODE_ROM (X2): Internal functions of MCU Driver
Component code that can be located in code memory.
MCU_START_SEC_CODE_FAST (X3): Interrupt functions of MCU Driver
Component code that can be located in code memory.
MCU_CFG_DATA_UNSPECIFIED (X4): This section consists of MCU
Driver Component constant configuration structures. This can be located in
code memory.
RAM Section (Y1, Y2, Y3, Y4 and Y5): NO_INIT_RAM_UNSPECIFIED (Y1): This section consists of the global RAM
variables that are used internally by MCU Driver Component. This can be
located in data memory.
NO_INIT_RAM_1BIT (Y2): This section consists of the global RAM variables of
1-bit size that are used internally by MCU Driver Component. This can be
located in data memory.
RAM_1BIT (Y3): This section consists of the global RAM variables of 1-bit
size that are initialized by start-up code and used internally by MCU Driver
Component. This can be located in data memory.
NO_INIT_RAM_32BIT (Y4): This section consists of the global RAM variables
of 32-bit size that are used internally by MCU Driver Component. This can be
located in data memory.
RAM_32BIT (Y5): This section consists of the global RAM variables of 32-bit
size that are initialized by start-up code and used internally by MCU Driver
Component. This can be located in data memory.
Remark X1, X2, Y1, Y2 , Y3 ,Y4 and Y5 pertain to only MCU Driver Component and
do not include memory occupied by Mcu_PBcfg.c file generated by MCU
Driver Component Generation Tool.
User must ensure that none of the memory areas overlap with each other.
Even ‘debug’ information should not overlap.
62
P1M Specific Information Chapter 13 Chapter 13 P1M Specific Information P1M supports following devices:
R7F701304
R7F701305
R7F701310
R7F701311
R7F701312
R7F701313
R7F701314
R7F701315
R7F701318
R7F701319
R7F701320
R7F701321
R7F701322
R7F701323
13.1. Interaction between the User and MCU Driver Component The details of the services supported by the MCU Driver Component to the
upper layers users and the mapping of the channels to the hardware units is
provided in the following sections:
13.1.1. Translation Header File The P1x_translation.h translation header file supports following devices:
R7F701304
R7F701305
R7F701310
R7F701311
R7F701312
R7F701313
R7F701314
R7F701315
R7F701318
R7F701319
R7F701320
R7F701321
R7F701322
R7F701323
13.1.2. ISR Function The table below provides the list of handler addresses corresponding to the
hardware unit ISR(s) in MCU Driver Component. The user should configure
the ISR functions mentioned below:
65
Chapter 13 P1M Specific Information
Table 13-1 ISR For MCU Interrupt Source Name of the ISR Function MCU_FEINT_ISR
INTECM
MCU_ECM_EIC_ISR
Note: The functions with “INTERRUPT “as pilot tag, provides an indication to
the compiler that the function following this tag is an interrupt function type.
The tag name can vary according to the compiler. User should take care of
the tag name with respect to compiler used.
13.1.2.1 Interrupt routines for OS Module's <Module>_Irq.c/h files must include "Os.h" header file to obtain
the interrupt category information configured in the OS. Therefore
preprocessor definitions shown by below table must be expected to be
published in Os.h file by the OS in case of CAT2 or to be used in the
interrupt vector table in case of CAT1. In case of CAT2 ISRs the “ISR
(Isr_Name)” Keyword must be used in <Module>_Irq.c/h file.
Interrupt Category Naming Convention CAT1
<MCAL_INTERRUPT_NAME>_ ISR
CAT2
<MCAL_INTERRUPT_NAME>_CAT2_ISR
CAT2 (In case the handles of the
Os_<MCAL_INTERRUPT_NAME>_CAT2_ISR
OsIsr container are generated
without ‘Os_’ prefix by Os
generation tool)
Example of module_irq.h: /* Defines the CAT2 interrupt mapping */
#if defined (Os_<MCAL_INTERRUPT_NAME>_CAT2_ISR) || defined
(<MCAL_INTERRUPT_NAME>_CAT2_ISR)
/* Use ISR() macro from Os.h */
/* Defines the CAT1 interrupt mapping */
#else
extern FUNC(type, memclass) <MCAL_INTERRUPT_NAME>_ ISR(void);
#endif
Example of module_irq.c: /* Defines the CAT2 interrupt mapping */
#if defined (Os_<MCAL_INTERRUPT_NAME>_CAT2_ISR) || defined
(<MCAL_INTERRUPT_NAME>_CAT2_ISR)
ISR(<MCAL_INTERRUPT_NAME>_CAT2_ISR)
66

P1M Specific Information Chapter 13 /* Defines the CAT1 interrupt mapping */
#else
FUNC(type, memclass) <MCAL_INTERRUPT_NAME>_ ISR(void)
#endif
Note: In case if the MCAL modules are to be used standalone without having standard
Autosar Os module, the user has to prepare an Os.h stub file with the published
handles only for those interrupt names which are to be used as CAT2.
13.1.3. Parameter Definition File Parameter definition files support information for P1M
Table 13-2 PDF information for P1M PDF Files Devices supported R403_MCU_P1M_04_05.arxml
701304, 701305
R403_MCU_P1M_10_to_15_18_to_23.arx 701310, 701311, 701312, 701313,
ml
701314, 701315, 7013018, 701319,
701320, 701321, 701322, 7013023
13.2. Sample Application 13.2.1 Sample Application Structure The Sample Application is provided as reference to the user to understand
the method in which the MCU APIs can be invoked from the application.
Figure 13-1 Overview of MCU Driver Sample Application
67
Chapter 13 P1M Specific Information
The Sample Application of the P1M is available in the path:
X1X\P1x\modules\mcu\sample_application
The Sample Application consists of the following folder structure:
X1X\P1x\modules\mcu\definition\<AUTOSAR_version>\<SubVariant>
\R403_MCU_P1M_04_05.arxml
\R403_MCU_P1M_10_to_15_18_to_23.arxml
X1X\P1x\modules\mcu\sample_application
\<SubVariant>\<AUTOSAR_version>
\src\Mcu_PBcfg.c
\include\Mcu_Cfg.h
\include\Mcu_Cbk.h
\include\Mcu_Reg.h
\config\App_MCU_P1M_701304_Sample.arxml
\config\App_MCU_P1M_701305_Sample.arxml
\config\App_MCU_P1M_701310_Sample.arxml
\config\App_MCU_P1M_701311_Sample.arxml
\config\App_MCU_P1M_701312_Sample.arxml
\config\App_MCU_P1M_701313_Sample.arxml
\config\App_MCU_P1M_701314_Sample.arxml
\config\App_MCU_P1M_701315_Sample.arxml
\config\App_MCU_P1M_701318_Sample.arxml
\config\App_MCU_P1M_701319_Sample.arxml
\config\App_MCU_P1M_701320_Sample.arxml
\config\App_MCU_P1M_701321_Sample.arxml
\config\App_MCU_P1M_701322_Sample.arxml
\config\App_MCU_P1M_701323_Sample.arxml
In the Sample Application all the MCU APIs are invoked in the following
sequence:
• The API Mcu_Init is invoked with a valid database address for the proper
initialization of the MCU Driver, all the MCU Driver control registers and
RAM variables will get initialized after this API is called.
• The API Mcu_InitRamSection is invoked to initialize the RAM section wise
as provided from the configuration structure.
• The API Mcu_InitClock is invoked to initialize the clock sources Main Osc,
High Speed Internal ring Oscillator.
• The API Mcu_GetPllStatus is invoked to provide the lock status of the
PLL. This API will return the PLLstatus as MCU_PLL_LOCKED or
68
P1M Specific Information Chapter 13 MCU_PLL_UNLOCKED.
• The API Mcu_GetResetReason is invoked to read the reset type from
the hardware by checking the RESF register and if not supported,
returns MCU_POWER_ON_RESET. This API shall clear the reset
factor register.
• The API Mcu_GetResetRawValue is invoked to return reset type value
from the hardware register RESF
• The API Mcu_GetVersionInfo is invoked to get the version of the MCU
Driver module with a variable of Std_VersionInfoType, after the call of
this API the passed parameter will get updated with the MCU Driver
version details.
• The API Mcu_PerformReset invoked to microcontroller reset is
performed by accessing the software reset register.
• The API Mcu_SetMode is invoked to activate the MCU power modes.
Remark To unmask all resets ‘target pinmask k’ command is used.
13.2.2 Building Sample Application 13.2.2.1. Configuration Example This section contains the typical configuration which is used for measuring
RAM/ROM consumption, stack depth and throughput details.
Configuration Details:
App_MCU_<SubVariant>_<Device_Number>_Sample.arxml
For P1M the <Device Number> indicates the device to be compiled, which can
be 701304, 701305, 701310, 701311, 701312, 701313, 701314, 701315,
701318, 701319, 701320, 701321, 701322, 701323
13.2.2.2. Debugging the Sample Application Remark GNU Make utility version 3.81 or above must be installed and available in the
path as defined by the environment user variable “GNUMAKE” to complete
the build process using the delivered sample files.
Open a Command window and change the current working directory to “make”
directory present as mentioned in below path:
“X1X\P1x\common_family\make\<compiler>”
Now execute the batch file SampleApp.bat with following parameters:
SampleApp.bat mcu <AUTOSAR_version> <Device_name>
•
After this, the tool output files will be generated with the configuration
as mentioned in App_MCU_P1M_701318_Sample.arxml file available
in the path:
“X1X\P1x\modules\mcu\sample_application\<SubVariant>\<AUTOSAR_ve
rsion>\config\App_MCU_P1M_701318_Sample.arxml”
69
Chapter 13 P1M Specific Information
•
After this, all the object files, map file and the executable file
App_MCU_P1M_Sample.out will be available in the output folder:
(“X1X\P1x\modules\mcu\sample_application\<SubVariant>
\obj\<compiler>”)
•
The executable can be loaded into the debugger and the sample
application can be executed
Remark Executable files with ‘*.out’ extension can be downloaded into the target
hardware with the help of Green Hills debugger.
• If any configuration changes (only post-build) are made to the ECU
Configuration Description files
“X1X\P1x\modules\mcu\sample_application\<SubVariant>\<AUTOSAR_versi
on>\config\App_MCU_P1M_701318_Sample.arxml”
•
The database alone can be generated by using the following commands.
make –f App_MCU_P1M_Sample.mak generate_mcu_config
make –f App_MCU_P1M_Sample.mak App_MCU_P1M_Sample.s37
•
After this, a flash able Motorola S-Record file App_MCU_P1M_Sample.s37
is available in the output folder.
Note: The <Device_name> indicates the device to be compiled, which can be
701304, 701305, 701310, 701311, 701312, 701313, 701314, 701315, 701318,
701319, 701320, 701321, 701322, 701323.
13.3. Memory and Throughput 13.3.1. ROM/RAM Usage The details of memory usage for the typical configuration, with DET disabled
as provided in Section 13.2.2.1
Configuration Example are provided in this
section.
Table 13-3 ROM/RAM Details without DET
Sl. No. ROM/RAM Segment Name Size in bytes in GHS 1.
ROM
MCU_PUBLIC_CODE_ROM
452
MCU_PRIVATE_CODE_ROM
5588
MCU_FAST_CODE_ROM
572
MCU_CFG_DATA_UNSPECIFIED
584
ROM.RAM_1BIT
1
ROM.RAM_32BIT
8
2.
RAM
NO_INIT_RAM_UNSPECIFIED
28
RAM_1BIT
3
RAM_32BIT
0
The details of memory usage for the typical configuration, with DET enabled
70
P1M Specific Information Chapter 13 and all other configurations as provided in 13.2.2.1
Configuration Example
are provided in this section.
Table 13-4 ROM/RAM Details with DET Sl. No. ROM/RAM Segment Name Size in bytes in GHS 1.
ROM
MCU_PUBLIC_CODE_ROM
814
MCU_PRIVATE_CODE_ROM
5588
MCU_FAST_CODE_ROM
572
MCU_CFG_DATA_UNSPECIFIED
584
ROM.RAM_1BIT
1
ROM.RAM_32BIT
0
2.
RAM
NO_INIT_RAM_UNSPECIFIED
28
RAM_1BIT
1
RAM_32BIT
0
13.3.2. Stack Depth The worst-case stack depth for MCU Driver Component for the typical
configuration provided in Section 13.2.2.1 Configuration Example is
approximately 36 bytes.
13.3.3. Throughput Details The throughput details of the APIs for the configuration mentioned in the
Section 13.2.2.1
Configuration Example are listed here. The clock frequency
used to measure the throughput is 160MHz for all APIs.
Table 13-5 Throughput Details of the APIs
Throughput in Sl. No. API Name microseconds in GHS Remarks 1.
Mcu_Init
671.450
-
2.
Mcu_InitClock
247.662
-
3.
Mcu_GetPllStatus
0.87
-
4.
Mcu_InitRamSection
10.450
-
5.
Mcu_GetResetReason
0.125
-
6.
Mcu_GetResetRawValue
0.112
-
7.
Mcu_GetVersionInfo
0.162
-
8.
Mcu_GetRamState
0.500
-
9.
Mcu_SetMode
0.87
-
10.
Mcu_EcmReleaseErrorOutPin
5.787
11.
Mcu_PerformReset
0.162
-
12.
Mcu_ProtectedWriteRetNone
3.587
-
71
Chapter 13 P1M Specific Information
72
Release Details Chapter 14 Chapter 14 Release Details
MCU Driver Software Version: 1.0.8
73
Chapter 14 Release Details
74
Revision History Sl. No. Description Version Date 1.
Initial Version
1.0.0
18-Oct-2013
2.
Following changes are made:
1.0.1
30-Apr-2014
1. Chapter 2 is updated for reference documents.
2. Section 4.3 is updated for Exclusive Area name change.
3. Section 4.4 is updated for adding user and supervisor mode details
for new APIs.
4. Chapter 6 is updated for Register details used in APIs.
5. Chapter 8 is updated for adding file description for tool generated
file ‘Mcu_Cbk.h’.
6. Section 10.3 is updated for adding new APIs in function definition.
7. Section 11.1 is updated for adding DET error.
8. Chapter 13 and section 13.1.1 is updated for adding new supported
devices.
9. Section 13.2 is updated for change in compiler and linker version
details.
10. Section 13.3 is updated for adding latest configuration details for
supported devices.
11. Section 13.3.2 is updated for change in configuration example for
sample application testing.
12. Section 13.4 is updated for updating ROM/RAM, Stack and
Throughput details.
13. Chapter 14 is updated for increment in MCU Driver software
version.
3.
Following changes are made:
1.0.2
09-May-2014
1. Chapter 4 is updated for adding a new section regarding RAM
Initialization.
2. Chapter 13 and section 13.3.1 is updated for removal of
unsupported devices.
4.
Following changes are made:
1.0.3
20-Oct-2014
1. Chapter 2 is updated for referenced documents version.
2. Section 13.1.1 is updated for adding the device names.
3. Section 13.2 is updated for compiler, assembler and linker details.
4. Section 13.3 is updated to add parameter definition file and sample
application configuration files for all P1M devices.
5. Chapter 14 is updated for MCU driver component version
information.
6. Deviation list is updated to add MCU_E_PARAM_POINTER error
for Mcu_GetVersioInfo API and AUTOSAR requirement.
5
Following changes are made:
1.0.4
12-Dec-2014
1. Chapters 7 to 11 updated to start at odd page.
2. Date in Revision History updated.
3. Document page numbers are corrected.
4. Chapter 11 updated to add MCU_E_PARAM_MODE DET.
5. Page number is removed from publication info page.
6. Section 13.2 is updated for compiler, assembler and linker details.
7. Chapter 8 is update to include rh850_types.h file.
8. Section 13.4 is updated for Memory and throughput details.
75
Sl. No. Description Version Date 6
Following changes are made:
1.0.5
30-Apr-2015
1. New section, “4.7 Callout API” added to chapter 4.
2. Information regarding Interrupt vector table is added to “Section 4.1
General”.
3. As part of device support activity for R7F701304, R7F701305,
R7F701313, R7F701315, R7F701318 to R7F701323 updated
sections 3.1.1, 13.1, 13.2.
4. Removed section Compiler,Linker and Assembler in Chapter13.
5. Updated section 13.3 for memory and throughput
6. Copyright information has been changed to 2015
7
Following changes are made:
1.0.6
08-Jan-2016
1. Added details of stubs in section 3.1.1.
2. Section 4.1 General is updated.
3. Chapter 6 Register Details is updated by adding the missing
registers and APIs.
4. Section 7.1 is updated for new functionality of clearing error
out pin.
5. Alignment of Headings and Tables are corrected in Section 10.2
Type definition.
6. Section10.3 is updated for new API and 11.2 for new production
errors.
7. Alignment of bullet points of remarks are corrected in Chapter 12
Memory Organization.
8. Alignment of the text "P1x Mcu Sample Application" is corrected in
Figure 13-1 Overview of MCU Driver Sample Application.
9. Section 13.1.2.1 is added for OS interrupt routines.
10. Section 13.3 Memory and throughput updated.
11. Clock frequency used to measure the throughput is updated
in Section 13.3.3 Throughput Details.
12. Exclusive area for register protection renamed to
MCU_REGISTER_PROTECTION. Also added exclusive area
VARIABLE_PROTECTION.
13. Chapter14 is updated.
8
Following changes are made:
1.0.7
25-Mar-2016
1. Chapter 6 Register details are updated.
2. Section 4.3 Data consistency is updated.
3. Section 13.4 is updated for ROM/RAM, Stack and Throughput
details
4. Section 6.1 General is updated for the description of
Mcu_InitRamSection and McuRamSectorSetting.
5. R-number and Version are updated.
76
Sl. No. Description Version Date 9
Following changes are made:
1.0.8
24-Oct-2016
1. Chapter 4 section 4.1 General 5 points added.
2. Section 4.4 a Note is added below the table 'Supervisor mode and
User mode details'.
3. Table 4-1 MCU Driver Protected Resources List added in section
4.3 Data consistency.
4. VARIABLE_PROTECTION changed to MCU_VARIABLE_PROTECTION
in section
4.3 Data consistency.
5. Chapter 6 Register details are updated.
6. Section 3.1.1 Folder structure, chapter 8 C header file section,
Table 8-1 updated by adding Mcu_RegWrite.h.
7. DEM error for register write verify added in Table 11-2 DEM Errors
of MCU Driver Component.
8. Chapter 12 Memory Organization updated to follow initialization
policy.
9. Section 13.2 reference to .one and .html files are removed.
10. Note added in section 13.2.1 ISR function.
11. Added new section 13.3.4 Critical section details.
12. R Number updated.
13. Section 13.3 updated with throughput values.
14. Chapter 4 forethoughts section updated by adding points for
STATIC tag and for multiple invoke of Mcu_Init multiple times.
15. Chapter 14 release details updated.
10
The following changes are made:
1.0.9
08-Feb-2017
1. Abbreviations and Acronyms updated.
2. Chapter 14, Release Details updated.
. 3. Updated R number, Notice and Copyright information.
4. Section 13.3 Memory and Throughput Details updated
77
AUTOSAR MCAL R4.0.3 User's Manual MCU Driver Component Ver.1.0.9 Embedded User’s Manual Publication Date: Rev.1.01, February 8, 2017
Published by: Renesas Electronics Corporation

SALES OFFICES http://www.renesas.com Refer
to "http://www.renesas.com/" for the latest and de tailed information.
Renesas Electronics America Inc.
2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333
Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949
Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HAL II Stage, Indiranagar, Bangalore, India
Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141
© 2006-2017 Renesas Electronics Corporation. All rights reserved.
Colophon 4.1

AUTOSAR MCAL R4.0.3
User’s Manual
R20UT3720EJ0101
Document Outline
6 - R20UT3721EJ0101-AUTOSAR
AUTOSAR MCAL R4.0 User's Manual8 - R20UT3721EJ0101-AUTOSARs


AUTOSAR MCAL R4.0.3
User’s Manual
MCU Driver Component Ver.1.0.8
Generation Tool User’s Manual
Target Device:
RH850/P1x
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website
(http://www.renesas.com). www.renesas.com Rev.1.01 Feb 2017
2
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits,
software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses
and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents,
copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical
information described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application
examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas
Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas
Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration,
modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended
applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication
equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or
bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and
undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics
disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics
product for which the product is not intended by Renesas Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General
Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the
ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation
characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of
the use of Renesas Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas
Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the
possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics
products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your
products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the
final products or systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each
Renesas Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances,
including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all
these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your
noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or
sale is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or
technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction,
such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering
such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of
disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or
technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will
engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall
comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting
jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and
conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from
your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned
subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
3
4
Abbreviations and Acronyms Abbreviation / Acronym Description AUTOSAR
AUTomotive Open System ARchitecture
BSWMDT
Basic Software Module Description Template
DEM
Diagnostic Event Manager
ECM
Error Control Module
ECU
Electronic Control Unit
Id
Identifier
MCAL
Micro Controller Abstraction Layer
MCU
Micro Controller Unit
MHz
Mega Hertz
MSN
Module Specific Name
SPAL
Standard Peripheral Abstraction Layer
XML
eXtensible Mark-up Language
Rev.
Revision
RUCG
Renesas Unified Code Generator
Definitions Terminology Description BSWMDT File
This file is the template for the Basic Software Module Description.
Configuration XML File (.cfgxml)
This file contains the setting of command line options.
ECU Configuration Description
Input file to MCU Driver Generation Tool. It is generated by
File(.arxml)
ECU Configuration Editor.
Sl.No
Serial Number.
Translation XML File (.trxml)
This file contains the translation and device specific header file path.
5
6
Table of Contents Chapter 1 Introduction .................................................................................... 9 1.1. Document Overview .......................................................................................................... 9 Chapter 2 Reference ...................................................................................... 11 2.1. Reference Documents .................................................................................................... 11 2.2. Trademark Notice ............................................................................................................ 11 Chapter 3 MCU Driver Generation Tool Overview ....................................... 13 Chapter 4 Input Files ..................................................................................... 15 Chapter 5 Output Files .................................................................................. 17 Chapter 6 Precautions ................................................................................... 19 Chapter 7 User Configuration Validation ..................................................... 21 Chapter 8 Messages ...................................................................................... 23 8.1 Error Messages ................................................................................................................ 23 8.2 Warning Messages .......................................................................................................... 32 8.3 Information Messages .................................................................................................... 33 Chapter 9 Notes ............................................................................................. 35 7
List of Figures Figure 3-1 Overview of MCU Driver Generation Tool ........................................................................... 13 Figure 3-2 Generator Concept Flow Chart ............................................................................................ 14 List of Tables
Table 5-1 Output Files Description .......................................................................................................... 17 Table 8-1 Parameters and Container related to error ERR101004 ......................................................... 23 Table 8-2 Parameters and containers related to error ERR101005 ........................................................ 26 Table 8-3 Parameter and Container related to error ERR101017 ........................................................... 27 Table 8-4 Parameters and Container related to error ERR101026 ......................................................... 28 Table 8-5 Parameters and Container related to error ERR101032 ......................................................... 29 Table 8-6 Parameters and Containers related to error ERR101041 ....................................................... 30 Table 8-7 Parameters and Container related to error ERR101042 ......................................................... 31
8
Introduction Chapter 1 Chapter 1 Introduction The MCU Driver component provides services for basic microcontroller
initialization, Error Control Module (ECM), reset and microcontroller
specific functions required from other SPAL components.
The MCU Driver Component comprises of two sections i.e., Embedded
Software and Generation Tool to achieve scalability and configurability.
The document describes the features of the MCU Driver Generation Tool.
MCU Driver Generation Tool is a command line tool that extracts information
from ECU Configuration Description File, BSWMDT File and generates MCU
Driver C source and C header files (Mcu_PBcfg.c, Mcu_Reg.h, Mcu_Cbk.h
and Mcu_Cfg.h).
1.1. Document Overview This user manual is organized as given in the table below:
Section Contents Section 1 (Introduction)
Provides an introduction to the document and explains how information
is organized in this manual.
Section 2 (Reference)
Provides a list of documents referred while developing this document.
Section 3 (MCU Driver
Provides the MCU Driver Generation Tool Overview.
Generation Tool Overview)
Section 4 (Input Files)
Provides information about ECU Configuration Description File.
Section 5 (Output Files)
Explains the output files that are generated by the MCU Driver
Generation Tool.
Section 6 (Precautions)
Contains precautions to be taken during configuration of ECU
Configuration Description File.
Section 7 (User Configuration
Describes about user configuration validation done by the MCU Driver
Validation)
Generation Tool.
Section 8 (Messages)
Describes all the Error/Warning/Information messages of R4.0.3 which
helps the user to understand the probable reason for the same.
Section 9 (Notes)
Provides notes to help the user to understand this document better.
9
Chapter 1 Introduction 10
Reference Chapter 2 Chapter 2 Reference 2.1. Reference Documents The following table lists the documents referred to develop this document:
Sl. No Title Version 1.
Autosar R4.0 3.2.0
AUTOSAR_SWS_MCUDriver.pdf
2.
P1x Parameter Definition File 1.1.9
R403_MCU_P1M_04_05.arxml
3.
P1x Parameter Definition File 1.0.6
R403_MCU_P1M_10_to_15_18_to_23.arxml
2.2. Trademark Notice Microsoft and Windows are trademarks/registered trademarks of Microsoft
Corporation.
11
Chapter 2 Reference 12
MCU Driver Generation Tool Overview Chapter 3 Chapter 3 MCU Driver Generation Tool Overview MCU Driver Generation Tool overview is shown below.
ECU Configuration Description File, Mcu_Cfg.h, RUCG tool Translation XML Mcu_Reg.h, File, BSWMDT File, Mcu_Cbk.h, Configuration Mcu_PBcfg.c XML File and
Mcu_P1x.dll Figure 3-1 Overview of MCU Driver Generation Tool Renesas Unified Code Generator (RUCG) tool shall be used for MCU driver
configuration generation.
MCU Driver Generation Tool is a command line tool that extracts, analyzes
the configuration details provided in the input file and validates correctness of
the data and provides scalability and configurability for MCU Driver module. It
accepts ECU Configuration Description File(s), Translation XML File,
BSWMDT File and Configuration XML File as input and displays appropriate
context sensitive error messages for wrong input and exits. Tool creates the
Log file (Mcu.log) that contains the list of Error/Warning/Information messages
in the output directory.
For the error free input file, the tool generates the following output files:
Mcu_Cfg.h, Mcu_Reg.h, Mcu_Cbk.h and Mcu_PBcfg.c.
Mcu_Cfg.h, Mcu_Reg.h and Mcu_Cbk.h will be compiled and linked with
MCU Driver Module. Mcu_PBcfg.c will be compiled and linked separately
from the other C Source files and placed in flash.
ECU Configuration Description File can be created or edited using ECU
Configuration Editor.
13
Chapter 3 MCU Driver Generation Tool Overview Parameter definition file Configuration Pdf.arxml Cfg.arxml Translation XML Transaltion_X1x.h *.trxml Device Header File <MSN>_X1x .dll & RUCG .exe .h
Output folder *.h inc -o folder *.c src Figure 3-2 Generator Concept Flow Chart Remark • In case of errors the generation tool returns a 1, in case of no errors the
generation tool returns a 0.
• MCU Driver Generation Tool uses “Common Published Information” from
MCU module specific BSWMDT File. MCU module specific BSWMDT File
should not be updated manually since it is “Static Configuration” file.
14
Input Files Chapter 4
Chapter 4 Input Files RUCG Tool accepts ECU Configuration Description File(s), Translation XML
File, BSWMDT File Configuration XML File and Mcu_P1x.dll as input. MCU
Driver Generation Tool needs information about MCU Driver module. Hence
ECU Configuration Description File should contain configuration of MCU
Driver module. Generation Tool ignores any other AUTOSAR component
configured in the ECU Configuration Description File. ECU Configuration
Description File can be generated using configuration editor.
ECU Configuration Description File must comply with AUTOSAR standard
ECU Configuration Description File format.
Remark The detailed explanation about the parameters and containers are found in
Parameter Definition File mentioned in Reference Documents section.
15
Chapter 4 Input Files 16
Output Files Chapter 5 Chapter 5 Output Files MCU Driver Generation Tool generates configuration details in C Header and
C Source files Mcu_Cfg.h, Mcu_Reg.h, Mcu_Cbk.h and Mcu_PBcfg.c.
The content of each output file is given in the table below:
Table 5-1 Output Files Description Output File Details Mcu_Cfg.h
This file contains pre-compile time parameters.
Mcu_Reg.h
This file contains the definitions for addresses of the hardware registers used in the
MCU Driver Module.
Mcu_Cbk.h
This file contains callback function prototype declarations to be used by application.
Mcu_PBcfg.c
This file contains post-build configuration data.
Remark Output files generated by MCU Driver Generation Tool should not be modified
or edited manually.
17
Chapter 5 Output Files 18
Precautions Chapter 6 Chapter 6 Precautions • ECU Configuration Description File and BSWMDT File must comply with
AUTOSAR standard for R4.0.3 ECU Configuration Description File and
BSWMDT File respectively.
• The input file must contain MCU Driver and DEM component related
configuration.
• Default Translation XML File (Mcu_P1x.trxml) should be present in same
location of Mcu_P1x.dll and RUCG.exe when the variant specific trxml file
is not given as input in command line.
• Default Configuration XML File (Mcu_P1x.cfgxml) must be present in same
location of Mcu_P1x.dll.
• If Translation XML File is not provided on the command line,
Mcu_P1x.trxml which is present in same location of Mcu_P1x.dll is
considered as ‘default’ Translation XML File.
• If Configuration XML File is not provided on the command line,
Mcu_P1x.cfgxml which is present in same location of Mcu_P1x.dll is
considered as ‘default’ Configuration XML File.
• Translation XML File should contain the file extension ‘.trxml’.
• Configuration XML File should contain the file extension ‘.cfgxml’.
• All the function names and the string values configured should follow C
syntax for variables. It can only contain alphanumeric characters and “_”. It
should start with an alphabet.
• If the output files generated by MCU Driver Generation Tool are modified
externally, then they may not produce the expected results or may lead to
error/warning/Information messages.
• Short Name for a container should be unique within a name space.
• An error free ECU Configuration Description File generated from
configuration editor has to be provided as input to the MCU Driver
Generation Tool. Otherwise Tool may not produce the expected results or
may lead to errors/warnings/information messages.
• User has to make sure that the respective device specific configuration file
is used. Otherwise Tool may not produce the expected results or may lead
to errors/warnings/information messages.
• The description file should always be generated using AUTOSAR specified
configuration editor and it should not be edited manually.
• There is a limitation to the number of instances of the generator tools
running in parallel. Up to 15 instances of the generator tool will run in
parallel without any problem.
Remark Please refer the MCU Component User Manual for deviations from AUTOSAR
specifications, if any.
19
Chapter 6 Precautions 20
User Configuration Validation Chapter 7 Chapter 7 User Configuration Validation This section provides help to analyze the error, warning and information
messages displayed during the execution of MCU Driver Generation Tool. It
ensures conformance of input file with syntax and semantics. It also performs
validation on the input file for correctness of the data.
For more details on list of Error/Warning/Information messages that are
displayed as a result of input file(s) validation, refer Chapter 8 “
Messages”.
The Generation Tool displays error or warning or information when the user
has configured incorrect inputs. The format of Error/Warning/Information
message is as shown below.
• ERR/WRN/INF<mid><xxx>: <Error/Warning/Information Message>.
where,
<mid>: 101 - MCU Driver Module Id (101) for user configuration checks.
000 - for command line checks.
<xxx>: 001-999 - Message Id.
• File Name: Name of the file in which the error has occurred.
• Path: Absolute path of the container in which the parameter is present.
‘File Name’ and ‘Path’ need not be present for all Error/Warning/Information
messages.
21
Chapter 7 User Configuration Validation 22
Messages Chapter 8 Chapter 8 Messages The messages help to identify the syntax or semantic errors in the ECU
Configuration Description File. Hence it ensures validity and correctness of the
information available in the ECU Configuration Description File.
The following section gives the list of error, warning and information messages
displayed by the Generation Tool.
8.1 Error Messages ERR101001: Number of fields is not same for the entity 'Structure Name'. This error occurs, if the number of fields is not same in the structure that is to
be generated in the output file.
ERR101002: Field 'Field Name' is empty in the entity 'Structure Name'. This error occurs, if the structure fields that are to be generated in the output
file are empty.
ERR101003: 'MCU Driver' or 'DEM Driver' Component is not present in the
input file(s). This error occurs, if MCU Driver or DEM Driver component is not present in
the input ECU Configuration Description File(s).
ERR101004: The parameter 'parameter name' in the container 'container
name' should be configured. This error occurs, if any of the mandatory configuration parameter(s)
mentioned below is (are) not configured in ECU Configuration Description File.
The list of mandatory parameters with respect to container is listed below:
Table 8-1 Parameters and Container related to error ERR101004 Parameter Name Container Name McuVersionCheckExternalModules
McuDevErrorDetect
McuGetRamStateApi
McuInitClock
McuNoPll
McuPerformResetApi
McuGeneralConfiguration
McuVersionInfoApi
McuCriticalSectionProtection
McuSwResetCallApi
McuEcmDelayTimerOverflowValue
23
Chapter 8 Messages Parameter Name Container Name McuEcmErrorOutputMode
McuEcmErrorOutTimer
McuRamSectorSetting
McuDeviceName
McuClm0Operation
McuGeneralConfiguration
McuClm0MonitoringClockAccuracy
McuClm0SamplingClockAccuracy
McuClm1Operation
McuClm1MonitoringClockAccuracy
McuClm1SamplingClockAccuracy
McuClm2Operation
McuClm2MonitoringClockAccuracy
McuClm2SamplingClockAccuracy
McuClm3Operation
McuClm3MonitoringClockAccuracy
McuClm3SamplingClockAccuracy
McuCvmSelfDiagnosticTest
McuClma0SelfDiagnosticTest
McuClma1SelfDiagnosticTest
McuClma2SelfDiagnosticTest
McuClma3SelfDiagnosticTest
McuEcmSelfDiagnosticTest
McuLoopCount
McuLockStepSelfDiagnosticTest
McuStartUpSWResetTest
McuStartUpECMResetTest
McuInterruptConsistencyCheck
McuWriteVerify
McuClockSrcFailureNotification
McuLviDetectionLevel
McuLviResetMask
McuModuleConfiguration
McuNumberOfMcuModes
McuRamSectors
McuCvmOutMaskFbist
McuCvmOutMaskDiag
McuCvmOutputFilter
McuCvmDiagLockBit
McuCvmResetEnable
McuClockSettingId
McuMainOsciFrequency
McuClockSettingConfig
McuCpuMainSysClk
McuUnitName
McuUnitName
McuHighspeedPeriClk
McuPeripheralClock
McuUnitName
McuLowspeedPeriClk
McuPeripheralClock
24
Messages Chapter 8 Parameter Name Container Name McuWdtCounterDivider
McuWdtacounterClk
McuUnitName
McuPeripheralClock
McuExternalClk0SourceSel
McuExternalClk0DividerSel
McuExternalClock0
McuExternalClkOutSetting
McuExternalClk1SourceSel
McuExternalClk1DividerSel
McuExternalClock1
McuDivClockSel
McuAdcClk
McuUnitName
McuPeripheralClock
McuEcmErrorMaskableInterrupt
McuEcmErrorNonMaskableInterrupt
McuEcmErrorSource0 to McuEcmErrorSource42
McuEcmErrorInternalReset
(except McuEcmErrorSource2,
McuEcmErrorSource3, McuEcmErrorSource13,
McuEcmErrorNMIDelayTimer
McuEcmErrorSource25 and
McuEcmErrorMIDelayTimer
McuEcmErrorSource35)
McuEcmErrorOutputMask
McuEcmErrorInternalReset
McuEcmErrorOutputMask
McuEcmErrorSource129
MCU_E_CLOCK_FAILURE
McuDemEventParameterRefs
MCU_E_WRITE_TIMEOUT_FAILURE
McuModeType
McuMode
McuModeSettingConf
McuRamDefaultValue
McuRamSectionBaseAddress
McuRamSectorSettingConf
McuRamSectionSize
McuRamTypeSel
McuRstRsnConfPowOnClr
McuRstRsnConfPinRst
McuRstRsnConfSwRst
McuRstRsnConfWdta
McuRstRsnConfLockStepCompare
McuRstRsnConfClkMonUprLimErMosc
McuRstRsnConfClkMonLwrLimErMosc
McuRstRsnConfClkMonUprLimErWdt
McuRstRsnConfClkMonLwrLimErWdt
McuRstRsnConfClkMonUprLimErPclk
McuResetReason
McuRstRsnConfClkMonLwrLimErPclk
McuRstRsnConfClkMonUprLimErPe1
McuRstRsnConfClkMonLwrLimErPe1
McuRstRsnConfLRamEcc2AddPrty
McuRstRsnConfInstCacheRamEcc2
McuRstRsnConfCodeFlsEcc2AddPrty
McuRstRsnConfDataFlsEcc2
McuRstRsnConfDtsRamEcc2
McuRstRsnConfCsihRamEcc2
25
Chapter 8 Messages Parameter Name Container Name McuRstRsnConfCanRamEcc2
McuRstRsnConfFrRamEcc2
McuRstRsnConfFlsProgMode
McuRstRsnConfTestMode
McuRstRsnConfSingChipModInact
McuRstRsnConfPeGuard
McuRstRsnConfPBusGuard
McuRstRsnConfSarAdcPrty
McuRstRsnConfBusDataPrty
McuRstRsnConfEcmCompare
McuRstRsnConfLvi
McuRstRsnConfTempSensor
McuRstRsnConfDmaTrans
McuRstRsnConfDmaViol
McuRstRsnConfLRamEcc1
McuResetReason
McuRstRsnConfCodeFlsEcc1
McuRstRsnConfDataFlsEcc1
McuRstRsnConfDtsRamEcc1
McuRstRsnConfPeriRamEcc1
McuRstRsnConfBistCodeEcc1
McuRstRsnConfBistCodeEcc2
McuRstRsnConfFaci
McuRstRsnConfEcmDelayOverFlow
McuRstRsnConfRstUndefined
McuRstRsnConfRstUnknown
McuRstRsnConfCvmRst
ERR101005: The value for parameter ‘parameter name’ present in the
container 'container name' should be same across multiple
configuration set 'McuModuleConfiguration'.
This error occurs, if the value configured for the following parameter present
in the respective container is not same across multiple configuration set
McuModuleConfiguration. The validation for McuWdtCounterDivider
parameter will be carried out only if McuClma2operation is TRUE.
Table 8-2 Parameters and containers related to error ERR101005 Parameter Container McuMainOsciFrequency
McuClockSettingConfig
McuWdtCounterDivider
McuWdtacounterClk
ERR101006: The value of the parameter
'McuEcmErrorMaskableInterrupt' should configure as <true> since the
'McuMiNotification' parameter is configured in container <Configured
ecm error source container>.
This error occurs, if the value of the parameter
McuEcmErrorMaskableInterrupt is not configure as true, since the
26
Messages Chapter 8 McuMiNotification parameter is configured in container <Configured ecm
error source container>.
ERR101007: The configured value in 'McuPeripheralClock' in container
'McuWdtacounterClk' should be equal to <8000000/configured value of
McuWdtCounterDivider parameter>.
This error occurs, if the configured value in McuPeripheralClock in container
McuWdtacounterClk is not equal to <8000000/configured value of
McuWdtCounterDivider parameter>.
ERR101008: The configured value in 'McuExternalClockX' in container
'McuExternalClkOutSetting' should be equal to
<McuExternalClkXSourceSel/McuExternalClkXDividerSel>.
This error occurs, if the configured value in McuExternalClockX in container
McuExternalClkOutSetting is not equal to
<McuExternalClkXSourceSel/McuExternalClkXDividerSel>.
Remark Where X=0 or 1
ERR101009: The value of the parameter
'McuEcmErrorNonMaskableInterrupt' should configure as <true> since
the 'McuNmiNotification' parameter is configured in container
<Configured ecm error source container>.
This error occurs, if the value for parameter
McuEcmErrorNonMaskableInterrupt is not configure as true, since the
McuNmiNotification parameter is configured in container <Configured ecm
error source container>.
ERR101017: The value for parameter 'parameter name' configured in
container 'container name' should be <expected value of parameter>. In
general per configuration set, the value of 'parameter name' parameter
should start with <0> and should be sequential without any gaps. This error occurs, if the value configured for the following parameter in the
respective container does not start with 0 and not sequential in multiple
configurations set container McuModuleConfiguration.
Table 8-3 Parameter and Container related to error ERR101017 Parameter Container McuClockSettingId
McuClockSettingConfig
Remark As issue raised in Bugzilla: 54536 Autosar parameter
McuClockSettingId in McuClockSettingConfig container range is changed to 0
to 255 instead of 1 to 255.
ERR101020: The value for parameter ' McuRamSectionBaseAddress ' in
container ' McuRamSectorSettingConf ' should be in the range.
This error occurs, if value for parameter McuRamSectionBaseAddress in
container McuRamSectorSettingConf is not in the range of <configured value
for McuRamTypeSel>.
27
Chapter 8 Messages
ERR101022: Atleast one 'McuRamSectorSettingConf' container should be
configured. Since 'McuRamSectorSetting' parameter in
'McuGeneralConfiguration' container is configured as <true>.
This error occurs, if no McuRamSectorSettingConf container is configured and
parameter McuRamSectorSetting in McuGeneralConfiguration container is
configured as <true>.
ERR101026: The reference path <McuDemEventParameterRefs> provided
for the parameter 'Parameter Name' within the container 'Container Name'
is incorrect.
This error occurs, if the reference path <McuDemEventParameterRefs>
provided for the following parameters in McuDemEventParameterRefs
container is not correct.
Table 8-4 Parameters and Container related to error ERR101026 Parameter Container MCU_E_CLOCK_FAILURE
MCU_E_WRITE_TIMEOUT_FAILURE
MCU_E_CVM_SELFDIAG_FAILURE
McuDemEventParameterRefs
MCU_E_CLM_SELFDIAG_FAILURE
MCU_E_ECM_SELFDIAG_FAILURE
MCU_E_LOCKSTEP_SELFDIAG_FAILURE
MCU_E_RESETCONTROLLER_STARTUP_FAILURE
MCU_E_INT_INCONSISTENT
MCU_E_REG_WRITE_VERIFY
ERR101027: The short name of the container 'McuClockSettingConfig'
should be same for clock having 'McuClockSettingId' <value of
McuClockSettingId> across multiple configuration sets.
This error occurs, if the short name of the container McuClockSettingConfig is
not same for clock having same McuClockSettingId across multiple
configuration sets.
ERR101029: The value for parameter 'McuLviResetMask' present in
container 'McuModuleConfiguration' should be same across multiple
configurations set.
This error occurs, if the value for parameter McuLviResetMask present in
container McuModuleConfiguration is not same across multiple configurations
set.
ERR101031: The value for parameter 'McuInitClock' present in container
'McuGeneralConfiguration' should not be configured as <false>.
This error occurs, if the value for parameter McuInitClock present in container
McuGeneralConfiguration is configured as false.
28
Messages Chapter 8
ERR101032: The value for the parameter 'Parameter Name' present in the
container 'Container Name' should be same across multiple
configuration set 'McuModuleConfiguration'.
This error occurs, if the value configured for the following parameters in
McuDemEventParameterRefs container is not same across multiple
configuration set container McuModuleConfiguration.
Table 8-5 Parameters and Container related to error ERR101032 Parameter Container MCU_E_CLOCK_FAILURE
MCU_E_WRITE_TIMEOUT_FAILURE
MCU_E_CVM_SELFDIAG_FAILURE
MCU_E_CLM_SELFDIAG_FAILURE
MCU_E_ECM_SELFDIAG_FAILURE
McuDemEventParameterRefs
MCU_E_LOCKSTEP_SELFDIAG_FAILURE
MCU_E_RESETCONTROLLER_STARTUP_FAILURE
MCU_E_INT_INCONSISTENT
MCU_E_REG_WRITE_VERIFY
ERR101035: The value for parameter 'McuClockSettingId' present in
container 'McuClockSettingConfig' should be same across multiple
configurations set container 'McuModuleConfiguration'. This error occurs, if the value for parameter McuClockSettingId present in
container McuClockSettingConfig does not same across multiple configurations
set container McuModuleConfiguration.
ERR101036: Parameter 'MCU_E_CVM_SELFDIAG_FAILURE' should be
configured, since parameter 'McuCvmSelfDiagnosticTest' inside container ‘McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter 'MCU_E_CVM_SELFDIAG_FAILURE' is not
configured, since parameter 'McuCvmSelfDiagnosticTest' inside container
‘McuGeneralConfiguration' is configured as true.
ERR101037: Parameter 'MCU_E_CLM_SELFDIAG_FAILURE' should be
configured, since one or more of parameters
'McuClma0SelfDiagnosticTest', 'McuClma1SelfDiagnosticTest',
'McuClma2SelfDiagnosticTest' and 'McuClma3SelfDiagnosticTest' inside container ‘McuGeneralConfiguration’ is configured as <true>.
This error occurs, if parameter 'MCU_E_CLM_SELFDIAG_FAILURE' is not
configured, since one or more of parameters 'McuClma0SelfDiagnosticTest',
29
Chapter 8 Messages 'McuClma1SelfDiagnosticTest', 'McuClma2SelfDiagnosticTest' and
'McuClma3SelfDiagnosticTest' inside container ‘McuGeneralConfiguration’ is
configured as true.
ERR101038: Parameter 'MCU_E_ECM_SELFDIAG_FAILURE' should be
configured, since parameter 'McuEcmSelfDiagnosticTest' inside
container 'McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter 'MCU_E_ECM_SELFDIAG_FAILURE' is not
configured, since parameter 'McuEcmSelfDiagnosticTest' inside container
‘McuGeneralConfiguration' is configured as true.
ERR101039: Parameter 'MCU_E_LOCKSTEP_SELFDIAG_FAILURE'
should be configured, since parameter 'McuLockStepSelfDiagnosticTest'
inside container 'McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter 'MCU_E_LOCKSTEP_SELFDIAG_FAILURE' is
not configured, since parameter 'McuLockStepSelfDiagnosticTest' inside
container ‘McuGeneralConfiguration' is configured as true.
ERR101040: The value for parameters 'McuEcmErrorNMIDelayTimer' and
'McuEcmErrorMIDelayTimer' should not be configured as <true> for
containers 'McuEcmErrorSource4 to McuEcmErrorSource11'.
This error occurs, if the value for parameter 'McuEcmErrorNMIDelayTimer' and
'McuEcmErrorMIDelayTimer' are configured as true for containers
'McuEcmErrorSource4 to McuEcmErrorSource11'.
ERR101041: The value for parameter ‘Parameter Name’ present in
container McuGeneralConfiguration' should be configured as <true>
since parameter 'Parameter Name' is configured as <true> ".
This error occurs, if the value configured for parameter on left column of
following table present in container McuGeneralConfiguration is true but value
configured for parameter on right column of following table is configured as
false.
Table 8-6 Parameters and Containers related to error ERR101041 The Parameter which is configured as <true> Parameter that should be configured
as <true> McuClma0SelfDiagnosticTest
McuClm0Operation
McuClma1SelfDiagnosticTest
McuClm1Operation
McuClma2SelfDiagnosticTest
McuClm2Operation
McuClma3SelfDiagnosticTest
McuClm3Operation
ERR101042: The value for the parameters 'parameter name' and
'parameter name' present in the container 'McuDemEventParameterRefs'
should be unique.
This error occurs, if the value configured for the following parameters in
McuDemEventParameterRefs container is not unique.
30
Messages Chapter 8 Table 8-7 Parameters and Container related to error ERR101042 Parameter Container MCU_E_CLOCK_FAILURE
MCU_E_WRITE_TIMEOUT_FAILURE
MCU_E_CVM_SELFDIAG_FAILURE
McuDemEventParameterRefs
MCU_E_CLM_SELFDIAG_FAILURE
MCU_E_ECM_SELFDIAG_FAILURE
MCU_E_LOCKSTEP_SELFDIAG_FAILURE
MCU_E_RESETCONTROLLER_STARTUP_FAILURE
MCU_E_INT_INCONSISTENT
MCU_E_REG_WRITE_VERIFY
ERR101043: At least one ‘McuWdtacounterClk’ container should be configured. Since ‘McuClm2Operation’ parameter in
'McuGeneralConfiguration' container is configured as <true>.
This error occurs, if container McuWdtacounterClk is not configured since
parameter McuClm2Operation of container McuGeneralConfiguration is
configured as true.
ERR101044: The configured value for parameter ‘McuExternalClockX’ in container 'McuExternalClkOutSetting’ should be equal to 0 when
McuExternalClkXSourceSel is MCU_NO_OUTPUT. This error occurs, if the value configured for the parameter McuExternalClockX
in container McuExternalClkOutSetting is not equal to 0.
Remark Where X=0 or 1
ERR101045: The value for parameters ‘McuEcmErrorMaskableInterrupt’ or ‘McuEcmErrorNonMaskableInterrupt’ should be <true> in all container
McuEcmErrorSource<12 and 34> since ‘McuGetRamStateApi’ is configured as <true> in ‘McuGeneralConfiguration’ container. This error occurs, if the value configured for the parameters
McuEcmErrorMaskableInterrupt or should be <true> in all containers
McuEcmErrorSource<12 and 34> when McuGetRamStateApi’ is configured as
<true> in ‘McuGeneralConfiguration’ container.
ERR101046: The order of container 'McuRamSectorSettingConf'
configuration and their short names should be same across multiple
configuration sets. This error occurs, if the order of container 'McuRamSectorSettingConf'
configuration and their short are not same across multiple configuration
ERR101047: The number of 'McuRamSectorSettingConf' containers
should be same across multiple configuration sets. 31
Chapter 8 Messages This error occurs, if the number of 'McuRamSectorSettingConf' containers are
not same across multiple configuration sets.
ERR101048: The configured value for ‘McuPeripheralClock’ in container ‘McuAdcClk’ should be equal to <20000000, 40000000> since parameter ‘McuDivClockSel’ is configured as <CLK_LSB, CLK_LSB_BY_2>. This error occurs, if there is a mismatch in the setting of parameters
‘McuPeripheralClock’ and ‘McuDivClockSel’ in ‘McuAdcClk’ container.
ERR101049: Parameter
'MCU_E_RESETCONTROLLER_STARTUP_FAILURE' should be
configured, since parameter 'McuStartUpSWResetTest' inside
container 'McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter
‘MCU_E_RESETCONTROLLER_STARTUP_FAILURE’ is not configured,
since parameter ‘McuStartUpSWResetTest’ inside container
‘McuGeneralConfiguration' is configured as true.
ERR101050: Parameter ‘MCU_E_INT_INCONSISTENT’ should be
configured, since parameter ‘McuInterruptConsistencyCheck’ inside
container 'McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter ‘MCU_E_INT_INCONSISTENT’ is not
configured, since parameter ‘McuInterruptConsistencyCheck’ inside container
‘McuGeneralConfiguration' is configured as true.
ERR101051: Parameter 'Mcu_UseWVErrorInterface' should be
configured, since parameter 'McuWriteVerify' inside container
'McuGeneralConfiguration' is configured as <true>.
This error occurs, if parameter Mcu_UseWVErrorInterface is not configured,
when parameter McuWriteVerify inside McuGeneralConfiguration is
configured as true.
ERR101052: Parameter 'McuWVErrorNotification' should be configured,
since parameter 'Mcu_UseWVErrorInterface' inside container
'McuGeneralConfiguration' is configured as <true>. This error occurs, if parameter McuWVErrorNotification is not configured,
when parameter 'Mcu_UseWVErrorInterface inside McuGeneralConfiguration
is configured as true.
8.2 Warning Messages WRN101001: The value of the parameters
'McuEcmErrorNonMaskableInterrupt' and
'McuEcmErrorMaskableInterrupt' should not be <true> since the
parameter 'McuEcmErrorInternalReset' of the container <configured
Ecm error sources>is configured as <true>.
This warning occurs, if the value of the parameters
McuEcmErrorNonMaskableInterrupt and McuEcmErrorMaskableInterrupt is
<true> since the parameter McuEcmErrorInternalReset of the container
<configured Ecm error sources>is configured as <true>.
WRN101002: The value of the parameter
'McuEcmErrorMaskableInterrupt' should not be <true> since the
parameter 'McuEcmErrorNonMaskableInterrupt' of the container 32
Messages Chapter 8 <configured Ecm error sources> is configured as <true>.
This warning occurs, if the value of the parameter
McuEcmErrorMaskableInterrupt is <true> since the parameter
McuEcmErrorNonMaskableInterrupt of the container <configured Ecm error
sources>is configured as <true>.
WRN101003: The configured External Clock value for
McuExternalClockx exceeds 20Mhz
This warning occurs, if the configured External Clock value for
McuExternalClockx (x = 0 or 1) exceeds 20Mhz.
8.3 Information Messages INF101001: The configured ‘McuRamSectorSettingConf’ container is not
used. Since ‘McuRamSectorSetting’ parameter in ‘McuGeneralConfiguration’ container is configured as <false>.
This information occurs, if McuRamSectorSettingConf container is configured
and parameter McuRamSectorSetting in McuGeneralConfiguration container is
configured as <false>.
INF101002: The configured value for parameter ‘McuExternalClockX' will
be ignored if parameter 'McuExternalClkXSourceSel' is configured as
'MCU_NO_OUTPUT'.
This information occurs, if the configured value of parameter
McuExternalClockX is ignored when parameter McuExternalClkXSourceSel is
configured as MCU_NO_OUTPUT.
Remark Where X=0 or 1
INF101003: The parameter ‘McuEcmErrorMIDelayTimer’ / ’ McuEcmErrorNMIDelayTimer’ does not have any effect since the
corresponding interrupt ‘McuEcmErrorMaskableInterrupt’ / ‘McuEcmErrorNonMaskableInterrupt’ is configured as <false> in
container ‘McuEcmErrorSource’ .
This information occurs, if the parameter McuEcmErrorMIDelayTimer is
configured when McuEcmErrorMaskableInterrupt is configured as false in
same or the parameter McuEcmErrorNMIDelayTimer is configured when
McuEcmErrorNonMaskableInterrupt is configured as false.
33
Chapter 8 Messages 34
Notes Chapter 9 Chapter 9 Notes “Generation Tool” and “Tool” terminologies are used interchangeably to refer
MCU Driver Generation Tool.
35
Chapter 9 Notes 36
Revision History Sl.No. Description Version Date 1
Initial Version
1.0.0
18-Oct-2013
2
Following changes are made:
1.0.1
15-Apr-2014
•
Error message ERR101004 is updated in section 8.1 to add
the parameter McuRamSectorSetting, McuRamTypeSel,
McuModeType and McuLockStepSelfDiagnosticTest and to
remove the parameters
MCU_E_CVM_SELFDIAG_FAILURE,
MCU_E_CLM_SELFDIAG_FAILURE and
MCU_E_ECM_SELFDIAG_FAILURE.
•
Error messages ERR101020, ERR101022, ERR101036,
ERR101037, ERR101038, ERR101039, ERR101040,
ERR101041, ERR101042, ERR101043 and ERR101044 are
added newly in section 8.1.
•
Information message INF101001 and INF101002 is added
newly in section 8.3.
•
Error messages ERR101026 and ERR101032 are updated in
section 8.1.
3
Following changes are made:
1.0.2
30-Oct-2014
•
Error message ERR101004 is updated in section 8.1.
•
Reference Documents section is updated for adding
Parameter Definition Files.
•
Chapter 6 Precautions is updated.
•
Remark of Chapter 4 Input Files is updated for PDF
reference.
•
Error messages ERR101045, ERR101046 and ERR101047
are added newly in section 8.1.
•
Information message INF101003 is added newly in section
8.3.
•
McuRstRsnConfCvmRst container is added in error message
ERR101004 table.
4
The following changes are made:
1.0.3
28-Apr-2015
•
Pdf name and version are updated in Section 2.1
•
Updated version and copyright year.
37
Sl.No. Description Version Date 5
The following changes are made:
1.0.4
08-Jan-2016
•
Figure 3-2 Generator Concept Flow Chart is added.
•
Chapter 6 Precautions is updated.
•
Table numbers are added for tables present in Chapter 8.1
Error Messages.
•
In table 8.1 Parameters and Container related to error
ERR101004, parameters of containers
McuModuleConfiguration and McuAdcClk are updated.
•
Added Error message ERR101048, ERR101049 and
ERR101050.
6
The following changes are made:
1.0.5
25-Mar-2016
•
Error ERR101045 is updated.
•
Warning WRN101003 is added.
•
Copyright information is updated.
7
The following changes are made:
1.0.6
28-Jun-2016
•
Errors ERR101051, ERR101052 added in section 8.1.
•
R number updated.
•
ERR101005, ERR101049 description updated.
•
McuCvmDiagLockBit added in McuModuleConfiguration
container under table Table 8-1.
8
Following changes are made;
1.0.7
06-Sep-2016
•
Reference document version updated.
9
The following changes are made:
1.0.8
07-Feb-2017
Updated Abbreviations and Acronyms.
Updated Error ERR101044.
Updated R number.
Updated Notice and Copyright information.
38
39
AUTOSAR MCAL R4.0.3 User's Manual MCU Driver Component Ver.1.0.8 Generation Tool User's Manual Publication Date: Rev.1.01, February 07, 2017
Published by: Renesas Electronics Corporation

SALES OFFICES http://www.renesas.com Refer
to "http://www.renesas.com/" for the latest and de tailed information.
Renesas Electronics America Inc.
2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333
Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949
Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HAL II Stage, Indiranagar, Bangalore, India
Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141
© 2006-2017 Renesas Electronics Corporation. All rights reserved.
Colophon 4.1

AUTOSAR MCAL R4.0.3
User’s Manual
R20UT3721EJ0101
Document Outline
9 - R20UT3754EJ0101-AUTOSAR
RUCG Tool User's Manual11 - R20UT3754EJ0101-AUTOSARs


RUCG Tool
User’s Manual
Version 1.1.3
Target Device:
RH850/P1M
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
websit
e (http://www.renesas.com). www.renesas.com Rev.1.01 Feb 2017
2
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits,
software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses
and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents,
copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical
information described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application
examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas
Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas
Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration,
modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended
applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication
equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or
bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and
undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics
disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics
product for which the product is not intended by Renesas Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General
Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the
ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation
characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of
the use of Renesas Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas
Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the
possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics
products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your
products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the
final products or systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each
Renesas Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances,
including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all
these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your
noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or
sale is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or
technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction,
such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering
such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of
disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or
technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will
engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall
comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting
jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and
conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from
your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned
subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics
3
4
Abbreviations and Acronyms Abbreviation / Acronym Description ARXML/arxml
AUTOSAR xml
AUTOSAR
AUTomotive Open System Architecture
BSWMDT
Basic Software Module Description Template
<MSN>
Module Short Name
ECU
Electronic Control Unit
DMA
Direct Memory Access
ECU
Electronic Control Unit
MCAL
Microcontroller Abstraction Layer
MCU
Microcontroller Unit
XML
eXtensible Mark-up Language
DLL
Dynamic Linking Library
Definitions Terminology Description .arxml
AUTOSAR XML File.
.trxml
Translation XML File.
PerlCtrl
The utility converts a Perl program into an ActiveX control.
5
6
Table of Contents Chapter 1 Introduction .........................................................................9 1.1 Document Overview ............................................................................................................... 9 Chapter 2 Reference ........................................................................... 11 2.1. Reference Documents.......................................................................................................... 11 2.2. Trademark Notice ................................................................................................................ 11 Chapter 3 Tool Overview ..................................................................... 13 3.1 Usage..................................................................................................................................... 13 Chapter 4 Input Files .......................................................................... 17 4.1 Msn Control DLL .................................................................................................................. 17 4.2 ECU Configuration Description File(s) .............................................................................. 17 4.3 BSWMDT File ........................................................................................................................ 17 4.4 Translation XML File ............................................................................................................ 18
4.4.1 Translation Header File ............................................................................................. 18 4.4.2 Device Specific Header File ...................................................................................... 18 4.5 Configuration XML File ........................................................................................................ 19 4.6 Other Description Files........................................................................................................ 19 Chapter 5 Output Files ....................................................................... 21 Chapter 6 Precautions ........................................................................ 23 Chapter 7 User Configuration Validation .......................................... 25 Chapter 8 Messages ........................................................................... 27 8.1. RUCG Tool Messages .......................................................................................................... 27
8.1.1 Error Messages ......................................................................................................... 27 8.1.2 Warning Messages ................................................................................................... 28 8.1.3 Information Messages ............................................................................................... 28 8.2. Common Messages ............................................................................................................. 28
8.2.1 Error Messages ......................................................................................................... 28 8.2.2 Warning Messages ................................................................................................... 31 8.2.3 Information Messages ............................................................................................... 31 8.3. R3.2.2 Messages .................................................................................................................. 31
8.3.1 Error Messages ......................................................................................................... 32 8.3.2 Warning Messages ................................................................................................... 32 8.3.3 Information Messages ............................................................................................... 32 8.4. R4.0.3 Messages .................................................................................................................. 32
8.4.1 Error Messages ......................................................................................................... 32 8.4.2 Warning Messages ................................................................................................... 33 8.4.3 Information Messages ............................................................................................... 33 Chapter 9 Notes .................................................................................. 35 Chapter 10 Appendix .......................................................................... 37 7
List of Figures Figure 3.1 Tool Overview ........................................................................................................................ 13
List of Tables
Table 1.1 Document Overview .................................................................................................................. 9
Table 2.1 Reference Documents .............................................................................................................. 11
Table 3.1 Options and Description ........................................................................................................ 14
Table 8.1 R3.2.2 BSWMDT Mandatory Parameters .............................................................................. 32
Table 8.2 R4.0.3 BSWMDT Mandatory Parameters .............................................................................. 33 8
Introduction Chapter 1 Chapter 1 Introduction The document describes the features of the RUCG Tool.
RUCG Tool is a command line tool that extracts information from ECU
Configuration Description File(s) and generates Driver C source and C header
files.
This document contains information on the options, input and output files of the
RUCG Tool. In addition, this manual covers a step-by-step procedure for the
usage of tool.
1.1 Document Overview This user manual is organized as given in the table below:
Table 1.1 Document Overview Section Contents Section 1 (Introduction)
Provides an introduction to the document and explains how
information is organized in this manual.
Section 2 (Reference)
Provides a list of documents referred while developing this
document.
Section 3 (RUCG Tool
Provides the component overview of RUCG.
Overview)
Section 4 (Input Files)
Provides information about all the input files supplied to
Tool.
Section 5 (Output Files)
Explains the output files that are generated by the RUCG Tool.
Section 6 (Precautions)
Contains precautions to be taken during execution of
RUCG Tool.
Section 7 (User Configuration Describes about user configuration validation done by the RUCG
Validation)
Tool.
Section 8 (Messages)
Describes all the Error/Warning/Information messages that
help the user to understand the probable reason for the
same.
Section 9 (Notes)
Provides notes to help the user to understand this document
better.
Section 10(Appendix)
Provides additional information, if any.
9
Chapter 1 Introduction 10
Reference Chapter 2 Chapter 2 Reference 2.1. Reference Documents The following table lists the documents referred to develop this document:
Table 2.1 Reference Documents Sl.No. Title Version 1.
EAAR-RS-0089.pdf
1.1.0
2.
GettingStarted_MCAL_Drivers_X1x.pdf
1.0.6
2.2. Trademark Notice Microsoft and Windows are trademarks/registered trademarks of Microsoft
Corporation.
11
Chapter 2 Reference 12
Tool Overview Chapter 3 Chapter 3 Tool Overview RUCG Tool is a command line tool that provides scalability and
configurability for the component. It accepts Module Specific DLL, ECU
Configuration Description File(s), BSWMDT File, Translation XML File and
Configuration XML File as input and generates the C Header and C
Source files. However Configuration XML File is optional.
RUCG Tool is a standalone windows executable. The Tool can run without
any additional dependencies.
Operating Environment:
Operating System
Windows 7 Professional SP1 64 bit
RAM
8 GB
RUCG Tool doesn’t support parallel execution.
Figure 3.1 Tool Overview For more information about input files to be given to the RUCG tool
refer section “4
Input Files”.
For more information about output files generated by the RUCG tool
refer section “5
Output Files”.
3.1 Usage This section provides the information regarding usage of the RUCG
Tool. It also provides the syntax of the command line arguments
(input filenames and options).
RUCG Tool executable is invoked as shown below.
RUCG.exe <DLL Path> [<Options>] {<Input Filename>}
13
Chapter 3 Tool Overview Where,
RUCG.exe: RUCG Tool Executable
DLL Path: Module specific DLL file path
Options: [-H/-Help -C/-Config -O/-Output -Osrc -Oinc -L/-Log –F/-
FILVERSION -D/-Dryrun –T/-TimeOut]
Input Filename: {ECU Configuration Description File(s), BSWMDT
File, Translation XML File [optional] and Configuration XML File
[optional]}
Notations:
{data} represents compulsory data
<data> represents the actual data that will be specified on command
line during tool usage.
[data] represents optional data.
Table 3.1 Options and Description Options Description -H/-Help
To display help regarding usage of the tool. Gets the highest priority when
used with other options.
-C/-Config
To execute tool with the options provided in the Configuration XML File.
Command line options get the higher priority than the options provided in
Configuration XML File.
-O/-Output
By default, the tool generates output files in the
“<Msn>_Output” folder in the path where DLL is present. The user can use
the -O option followed by the folder name, to generate the output files in the
specified folder. Either absolute path or relative path can be provided to
specify the folder name.
The C Source and C Header files are generated in the sub folders “src‟ and
“inc‟ within the output folder.
-Osrc
The user can use the -Osrc option followed by the folder name, to generate
the C Source files in the specified folder.
-Oinc
The user can use the -Oinc option followed by the folder name, to generate
the C Header files in the specified folder.
–L/-Log
To log the output to the <Msn>.log file in the output folder.
-D/-Dryrun
To execute tool in validation mode. The tool will not generate output files even
though the input file provided is error free.
-F/-FILEVERSION To display the perl file version which are used to create the DLL.
-T/-TimeOut
The user can use the –TimeOut option followed by the timeout value, to set
the maximum timeout for underlying DLL execution. Default timeout value is
10 seconds. Timeout value should be in the range of 1 – 60 seconds.
Remark If the “-H/-Help” option is provided on the command line without any
other inputs, RUCG Tool help is displayed.
14
Tool Overview Chapter 3 If the “-H/-Help” option is provided with DLL path, module specific
DLL help is displayed.
If Translation XML File is not provided on the command line then
"<Msn>_X1x.trxml" which is present in the same location of DLL is
considered as "default" Translation XML File by the RUCG Tool.
If Configuration XML File is not provided on the command line then
"<Msn>_X1x.cfgxml" which is present in the same location of DLL is
considered as "default" Configuration XML File by the RUCG Tool.
The RUCG tool doesn’t allow parallel execution.
The RUCG tool returns its execution status to the user through the
console. User can get this tool return status using the environment
variable %ERRORLEVEL%.
15
Chapter 3 Tool Overview 16
Input Files Chapter 4 Chapter 4 Input Files RUCG Tool accepts the following files as inputs to generate output files.
4.1 Msn Control DLL Module specific DLL File can be generated using PerlCtrl utility from the
perl scripts. The Perl script contains implementation of generating
configuration output files with PerlCtrl template. PerlCtrl accepts the perl
scripts and generates module specific DLL. For the PerlCtrl template
contents, refer Chapter "10 Appendix".
4.2 ECU Configuration Description File(s) The ECU Configuration Description file is in XML format, which contains
the configured values for Parameters, Containers and Modules. ECU
Configuration Description XML File format will be compliant with the
AUTOSAR ECU specification standards. ECU Configuration Description
File can be created or edited using ECU Configuration Editor.
4.3 BSWMDT File The BSWMDT File in XML format, which is the template for the Basic
Software Module Description. BSWMDT File format will be compliant with
the AUTOSAR BSWMDT specification standards.
RUCG Tool uses "Common Published Information" from module specific
BSWMDT file. BSWMDT file should not be updated manually since it is
"Static Configuration" file.
The required elements from BSWMDT File by module specific Generation
Tool is as follows:
BSW-MODULE-DESCRIPTION
• MODULE-ID
BSW-IMPLEMENTATION
• SW-VERSION
• VENDOR-ID
• AR-RELEASE-VERSION
• VENDOR-API-INFIX
In case of multiple driver support implementation, VENDOR-API-INFIX is
mandatory. In case of single driver support implementation, VENDOR-
API- INFIX is not used.
17
Chapter 4 Input Files 4.4 Translation XML File Translation XML File is in XML format which contains translation and
device specific header file path. For the syntax of the contents of
Translation XML File, please refer the Chapter 10 Appendix.
If mapped device specific address label is changed/updated then only
respective mapping in Translation Header File needs to be updated. In
this case there will not be any impact on Generation Tool for the
generation of address in tool generated output file(s).
4.4.1 Translation Header File This file is look-up table (mapping in the form of definitions) for the device
specific address labels. Based on the configuration in ECU Configuration
Description File, the mapped device specific address labels will be
searched in Device Specific Header File by RUCG Tool to generate
associated address in tool generated output file(s). For the Translation
Header File path, the value of "<Msn>DeviceName" parameter from the
container "<Msn>General" container should be present as child tag of
TRANSLATION-FILE-PATH in Translation XML File. Both "Absolute" and
"Relative" paths are supported by generation tool however default path is
"Relative" path.
E.g.
<TRANSLATION-FILE-PATH>
<Value_Of_MsnDeviceName>..\DF_Timer.h ..\DF_Timer_ISR.h</
Value_Of_MsnDeviceName>
</TRANSLATION-FILE-PATH>
4.4.2 Device Specific Header File This file contains device specific labels and associated address. Based on
the configuration in ECU Configuration Description File, the mapped
device specific address labels will be used to generate associated
address in tool generated output file(s). For the Device Specific Header
File path, the value of “<Msn>DeviceName” parameter from the container
“<Msn>General” container should be present as child tag of DEVICE-
FILE-PATH in Translation XML File. Both “Absolute” and “Relative” paths
are supported by generation tool however default path is “Relative” path.
If multiple Device Specific Header Files need to be provided for the same
device (value of “<Msn>DeviceName” parameter) in Translation XML File,
then each Device Specific Header File path should be separated with
“space”.
18
Input Files Chapter 4 E.g.
<DEVICE-FILE-PATH>
<Value_Of_MsnDeviceName>..\DF_Timer.h ..\DF_Timer_ISR.h</
Value_Of_MsnDeviceName>
</DEVICE-FILE-PATH>
4.5 Configuration XML File Configuration XML File is in XML format which contains command line
options and input/output path. For the syntax of the contents of
Configuration XML File, please refer the Chapter 10 Appendix.
E.g.
<LOG>ON/OFF</LOG>
<HELP>ON/OFF</HELP>
4.6 Other Description Files RUCG Tool requires other description files (i.e. Dem File and MCU File)
inputs, depends on the corresponding parameter configuration in the ECU
Configuration Description File
19
Chapter 4 Input Files 20
Output Files Chapter 5 Chapter 5 Output Files RUCG Tool is a command line tool that provides scalability and
configurability for Msn Driver component. It accepts inputs which
mentioned in the Chapter 4 Input Files and generates configuration details
in C Header and C Source files (<Msn>_Cfg.h, <Msn>_Cbk.h,
<Msn>_Lcfg.c and <Msn>_PBcfg.c).
<Msn>_Cfg.h
This file contains pre-compile configuration parameters.
<Msn>_Cbk.h
This file contains prototype declarations for callback notification functions.
<Msn>_Lcfg.c
This file contains link-time parameters.
<Msn>_PBcfg.c
This file contains post-build configuration data.
Log File
The file which briefs the execution details of RUCG Tool.
Remark: Output files generated by Msn Driver Generation Tool should not be modified or
edited manually
21
Chapter 5 Output Files 22
Precautions Chapter 6 Chapter 6 Precautions •
Module Specific DLL must be created by using PerlCtrl with the
PerlCtrl template which specified in this document. For the PerlCtrl
template contents, refer Chapter "10 Appendix".
•
ECU Configuration Description File and BSWMDT File must comply
with AUTOSAR standard for R4.0 ECU Configuration Description File
and BSWMDT File respectively.
•
Default Translation XML File (<Msn>_Xx4.trxml) must be present in
same location of DLL file.
•
Default Configuration XML File (<Msn>_Xx4.cfgxml) must be present in
same location of DLL file.
•
If Translation XML File is not provided on the command line,
<msn>_Xx4.trxml which is present in same location of DLL file is
considered as ‘default’ Translation XML File.
•
If Configuration XML File is not provided on the command line,
Msn_Xx4.cfgxml which is present in same location of DLL file is
considered as ‘default’ Configuration XML File.
•
ECU Configuration Description File(s) should contain the file
extension ‘.arxml’.
•
Translation XML File should contain the file extension ‘.trxml’.
•
Configuration XML File should contain the file extension ‘.cfgxml’.
•
If the output files generated by RUCG Tool are modified externally,
then they may lead to error while compilation or not produce the
expected results.
23
Chapter 6 Precautions 24
User Configuration Validation Chapter 7 Chapter 7 User Configuration Validation This section provides help to analyze the error, warning and information
messages displayed during the execution of RUCG Tool. It ensures
conformance of input file with syntax and semantics. It also performs
validation on the input file for correctness of the data.
For more details on list of Error/Warning/Information messages that are
displayed as a result of input file(s) validation, refer Chapter “8
Messages”.
The RUCG Tool displays error or warning or information messages when
the user has configured incorrect inputs. There are two types of messages
displayed,
RUCG Tool generated messages
Module Specific DLL generated messages
The format of RUCG Tool generated message is as shown below.
•
CGERR/CGINF/CGWAR<xx><yy>:
<Error/Warning/Information Message>.
<xx>: Stage of error happen
<yy>: Actual error code
The format of Module Specific DLL generated messages is as shown
below.
•
ERR/WRN/INF<mid><xxx>: <Error/Warning/Information
Message>. where,
<mid>: 123 - MSN Driver Module id (123) for user configuration checks.
000 - for command line checks.
<xxx>: 001-999 - Message id.
•
File Name: Name of the file in which the error has occurred
•
Path: Absolute path of the container in which the parameter is present.
‘File Name’ and ‘Path’ need not be present for all
Error/Warning/Information messages.
25
Chapter 7 User Configuration Validation 26
Messages Chapter 8 Chapter 8 Messages The messages help to identify the syntax or semantic errors in the inputs
supplied to execution.
The following section gives the list of error, warning and information
messages displayed during the tool execution.
When the tool detects the following errors, it will automatically exit after
showing the error message.
8.1. RUCG Tool Messages This section contains the list of error/warning/information messages which
is generated by the RUCG tool.
8.1.1 Error Messages
CG_ERR0001: Another instance is already running.
This error occurs, if trying to run more than one instance of application in
parallel.
CG_ERR0002: First argument should be a module specific DLL file
path.
This error occurs, if the specified first file argument does not have
extension (.dll or .ocx).
CG_ERR0003: DLL not found on specified path.
This error occurs, if the specified DLL file input is not found in the
specified location.
CG_ERR0004: Specified module specific DLL file is not DLL
executable.
This error occurs, if the specified DLL file is not a windows executable
DLL.
CG_ERR0101: Please provide valid number of arguments.
This error will occur, if the no option is provided in the command line.
CG_ERR0102: Please provide valid time out value in seconds (1 - 60).
This error occurs, if the specified timeout value is invalid or out of range.
CG_ERR0301: DLL activation context creation failed.
This error occurs, if the generated manifest file for the specified DLL is
wrong. Ensure the manifest file write implementation in the RUCG Tool.
CG_ERR0302: Specified DLL implemented using wrong PerlCtrl
template.
This error occurs, if the specified DLL file is created using wrong Control ID
in PerlCtrl template. For the PerlCtrl template contents, refer Chapter "10
Appendix".
CG_ERR0303: DLL directory should be write-enabled.
This error occurs, if the specified DLL file path is write protected.
CG_ERR0401: Code generation is not completed within the time out.
This error occurs, if the specified DLL does not return within a default or
specified timeout.
27
Chapter 8 Messages Note: When Code Generation is terminated due to timeout, the RUCG Tool
drops a temporary file (GLOB(0x2a8d104)) in the execution location. Please
delete the file after the execution.
CG_ERR0402: Cannot find implementation of method "execution” in
the DLL.
This error will occur, if the specified DLL created without entry function call
"execute".
CG_ERR0403: Error occurred while code generation.
This error will occur, when the specified DLL calls “exit” function while its
execution. In the tool code implementation, general assumption is “exit”
function in the perl script should called only at the erroneous conditions.
8.1.2 Warning Messages None
8.1.3 Information Messages
CG_INF0001: Tool Version This is to display Tool Version for each execution of the tool.
CG_INF0002: Module DLL Path
This is to display parsed Module DLL Path from the command line
arguments.
CG_INF0003: <RUCG Tool Usage Information>
This is to display usage information of the tool.
CG_INF0004: Execution terminated due to parallel execution errors. This information will occur, if the execution is terminated due to parallel
execution.
CG_INF0005: Execution terminated due to command line errors.
This information will occur, if the execution is terminated due to command
line errors.
CG_INF0006: Execution terminated due to the previous errors.
This information will occur, if the error happened during the DLL execution.
CG_INF0007: Code generation completed successfully.
This information will occur, if the tool execution completed successfully.
8.2. Common Messages This section contains the list of error/warning/information messages which
is common for AUTOSAR Renesas R3.2.2 and R4.0.3 X1x MCAL Driver
module that will be generated during the Module Specific DLL execution.
8.2.1 Error Messages
ERR000001: File <File_Name> does not exist.
This error occurs, if the input <File_Name> is not found.
ERR000002: Name of the Generation Tool Configuration XML File is 28
Messages Chapter 8 not given along with <-C/-CONFIG> option.
This error occurs, if the name of the Generation Tool Configuration XML File
is not given along with <-C/-CONFIG> option.
ERR000003: File <File name> is not as per XML standard. This error will occur, if the input <File name> is not as per XML standard.
ERR000004: Cannot open the <Log file name> file. This error will occur, if unable to open the <Log file name> file.
ERR000005: Name of output directory is not given along with <-O/-
OUTPUT> option. This error will occur, if the output directory name is not given along with <-
O/- OUTPUT> option.
ERR000006: Name of output directory is not given in OUTPUT-PATH
tag in <File name>. This error will occur, if the output directory is not given in OUTPUT-PATH
tag in configuration file.
ERR000007: The Generation Tool expects inputs. This error will occur, if Only specified Module Specific DLL path in the
command line without default configuration file.
ERR000008: The option <option> is not supported by the Generation
Tool. The Generation Tool supports <-O/-OUTPUT, -Osrc , -Oinc, -H/-
HELP, -L/-LOG, -C/-CONFIGFILE and -D/-DRYRUN>" options. This error will occur, if the invalid <option> is provided to the tool.
ERR000009: Invalid output directory name <output directory name> as
the file with same name exists. This error will occur, if the <output directory name> already exists.
ERR000010: Invalid output directory name <output directory name>
Directory name should not contain any of \*\?\"\|\: characters. This error will occur, if the <output directory name> path contains junk
character.
ERR000011: ECU Configuration Description File is not provided as
input to the Generation Tool. This error will occur, if the ECU Configuration Description File is not given in
the command line or in configuration file.
ERR000012: The input <File name> is not as per XML standard.
Provide the ECU Configuration Description File as input on the
command line. This error will occur, if the ECU Configuration Description File is not as per
XML standard.
ERR000014: 'TRANSLATION-FILE-PATH' tag in <File name> is empty. This error will occur, if the translation <File name> doesn’t have
“TRANSLATION-FILE-PATH‟ tags.
ERR000015: The 'device_name' tag should be present as child of
'TRANSLATION-FILE-PATH'' tag in <File name>. This error will occur, if the device mentioned in ECU Configuration
Description File is not present in “TRANSLATION-FILE-PATH‟ tag in the
<File name>
ERR000016: ‘DEVICE-FILE-PATH’ tag in <File name> is empty. 29
Chapter 8 Messages This error will occur, if the translation file <File name> doesn’t have
“DEVICE- FILE-PATH‟ tags.
ERR000017: The 'device_name’ tag should be present as child of
‘DEVICE-FILE-PATH' tag in <File name>. This error will occur, if the device mentioned in ECU Configuration
Description File is not present in “DEVICE-FILE-PATH‟ tag.
ERR000018: Cannot create directory <output directory name>. This error will occur, if unable to create output directory <output directory
name>.
ERR000019: Cannot open <File name>. This error will occur, if unable to open <File name>.
ERR000020: The macro label <macro label> should be unique in
<translation file name> translation C Header File. This error will occur, if macro label is not unique in translation C Header
File.
ERR000021: The macro definition for <macro label> macro is not
found in <translation file name> translation C Header File. The macro
label format should be <label format>. This error will occur, if macro definition is not found in translation C Header
File.
ERR000022: The macro value for <macro label> macro is empty in
<translation file name> translation C Header File. This error will occur, if macro label value is empty in translation C Header
File.
ERR000023: The macro definition for <macro value> macro is not
found in input device specific C Header File(s). This error will occur, if macro definition is not found in input device specific
C Header File(s).
ERR000024: The macro value for <macro value> macro is empty in
input device specific C Header File(s). This error will occur, if macro value is empty in input device specific C
Header File(s).
ERR000025: Path <Configured Reference Path> provided for Bsw
Module is incorrect. This error will occur, if the reference provided for Bsw Module Component is
incorrect.
ERR000026: BSWMDT content is not present in the input file(s) for
‘<Module Name>’ module. This error will occur, if the module specific BSWMDT content is not present
in the input files.
ERR000027: <MSN> BSWMDT File of either AUTOSAR R3.2 or R4.0
should be given as input. This error will occur, if the both R3.2 and R4.0 BSWMDT file given to the
input to the generation tool.
ERR000028: 'MODULE-DESCRIPTION-REF' element should be present
in the description file of '<Module Name>' module. This error will occur, if the MODULE-DESCRIPTION-REF element is not
present module specific description file.
30
Messages Chapter 8 ERR000029: AUTOSAR version of BSWMDT File and Module
Description File is different. This error will occur, if the AUTOSAR version of the BSWMDT File and
module description file is different.
Remark Apart from the above error codes DLL will generates some additional
Module Specific errors during the execution.
8.2.2 Warning Messages WRN000001: As per AUTOSAR ECU Configuration Description File
naming convention, the file extension should be '.arxml' for file. This warning will occur, if ECU Configuration Description files having an
extension other than ‟.arxml‟.
8.2.3 Information Messages
INF000001: DLL Version: This is to display DLL Version of specified module specific DLL.
INF000002: Command line arguments: This is to display the DLL arguments received from the Tool.
INF000003: The valid inputs are provided below. This information will occur, if the DLL option is not given. (I.e. only provide
Module DLL Path as command line arguments)
INF000004: Opened file <filename> at <time>. This information will occur, during opening the file.
INF000005: Error(s) and Warning(s) detected. This information will display the number of errors and warnings.
INF000006: Execution completed successfully. This information will occur, if the execution completed successfully.
INF000007: Execution completed successfully with warnings. This information will occur, if the execution completed successfully with
warnings.
INF000008: Execution terminated due to command line errors. This information will occur, if the execution terminated due to command line
errors.
INF000009: Execution terminated due to error in the input file. This information will occur, if the execution terminated due to error in the
input file.
INF000010: Execution terminated due to error, during the structure
generation in the output file. This information will occur, if the execution terminated during structure
generation in output file.
8.3. R3.2.2 Messages This section contains the list of error/warning/information messages which is
specific to AUTOSAR Renesas R3.2.2 X1x MCAL Driver module that will be
generated during the Module Specific DLL execution.
31
Chapter 8 Messages 8.3.1 Error Messages
ERR000030: The 'parameter tag name' tag should be configured in
BSWMDT File. This error will occur, if any of the configuration parameter(s) mentioned
below is (are) not configured in BSWMDT File.
The list of mandatory parameters with respect to container is listed below:
Table 8.1 R3.2.2 BSWMDT Mandatory Parameters Container Parameters BswImplementation
SW-MAJOR-VERSION
SW-MINOR-VERSION
SW-PATCH-VERSION
AR-MAJOR-VERSION
AR-MINOR-VERSION
AR-PATCH-VERSION
VendorApiInfix
BswModuleDescription
ModuleId
Note: VendorApiInfix parameter is mandatory for only some modules. 8.3.2 Warning Messages None.
8.3.3 Information Messages None.
8.4. R4.0.3 Messages This section contains the list of error/warning/information messages which is
specific to AUTOSAR Renesas R4.0.3 X1x MCAL Driver module that will be
generated during the Module Specific DLL execution.
8.4.1 Error Messages
ERR000030: The 'parameter tag name' tag should be configured in
BSWMDT File. This error will occur, if any of the configuration parameter(s) mentioned
below is (are) not configured in BSWMDT File.
32
Messages Chapter 8 The list of mandatory parameters with respect to container is listed below:
Table 8.2 R4.0.3 BSWMDT Mandatory Parameters Container Parameters BswImplementation
SwVersion
VendorId
ArReleaseVersion
VendorApiInfix
BswModuleDescription
ModuleId
Note: VendorApiInfix parameter is mandatory for only some modules. 8.4.2 Warning Messages None.
8.4.3 Information Messages None.
33
Chapter 8 Messages 34
Notes Chapter 9 Chapter 9 Notes “Tool” terminology is used interchangeably to refer RUCG Tool.
35
Chapter 9 Notes 36
Appendix Chapter 10 Chapter 10 Appendix •
Translation XML File Translation XML File content format shall be given as mentioned below:
<?xml version="1.0" encoding="UTF-8"?>
<!--
The tag PATH-DETAILS should not be renamed since it is top level
element.
-->
<PATH-DETAILS>
<!--
TRANSLATION-FILE-PATH should contain the path of the translation
header file. The tag TRANSLATION-FILE-PATH should not be
renamed. Only respective value should be updated for the translation
header file.
-->
<TRANSLATION-FILE-PATH>
<value_of_MsnDeviceName>Path</value_of_MsnDeviceName>
</TRANSLATION-FILE-PATH>
<!--
The tags present in DEVICE-FILE-PATH tag should contain the path
of the device specific C Header File.
The tags present in DEVICE-FILE-PATH should be equal to the value for
parameter
MsnDeviceName present in MsnGeneral container. The
tag DEVICE-FILE-PATH should not be renamed.
If multiple device header files need to provide for same device then
each file name should be separated with space.
-->
<DEVICE-FILE-PATH>
<value_of_MsnDeviceName>Path</value_of_MsnDeviceName>
</DEVICE-FILE-PATH>
</PATH-DETAILS>
37
Chapter 10 Appendix •
Configuration XML File Configuration XML File content format shall be given as mentioned below:
<?xml version=”1.0” encoding="UTF-8"?>
-->
<!--
None of the tag from this XML should be renamed or deleted.
-->
<XML>
<!-- Supported Command Line options<OPTION>
<!-- Only ON or OFF should be provided. -->
<HELP>ON/OFF</HELP>
<!-- Only ON or OFF should be provided. -->
<LOG>ON/OFF</LOG>
<!-- Only ON or OFF should be provided. -->
<DRYRUN>ON/OFF</DRYRUN>
<!-- Only ON or OFF should be provided. -->
<OUTPUT>OFF</OUTPUT>
<!-- Name of output directory -->
<OUTPUT-PATH>Path</OUTPUT-PATH>
</OPTION>
<!-- To provide input files. If multiple input files need to be
provided then each file should be separated with ",". -->
<INPUT-FILE>Path</INPUT-FILE>
</XML>
38
Appendix Chapter 10 •
PerlCtrl Template
Module Specific dll can be created by using PerlCtrl utility. PerlCtrl accepts
the perl scripts which consists implementation of generating module specific
configuration files with correct perlCtrl template.
PerlCtrl Template content shall be given as mentioned below:
=pod
=begin PerlCtrl
%TypeLib = (
PackageName => 'MsnCtrl',
TypeLibGUID => '{52093072-B5B3-413B-B4CF-
ACD3E3AAFE7A}', # do NOT edit this line
ControlGUID => '{1D887D1B-E692-4F8B-8552-F6957BB8B834}',
# do NOT edit this line either
DispInterfaceIID=> '{CFC0FF40-EAE4-49C8-8720-
850170DB1ADD}', # or this one
ControlName => 'MsnVeryOwnControl',
ControlVer => 1, # increment if new object with same ProgID
# create new GUIDs as well
ProgID => 'MsnCtrl.Control',
DefaultMethod => 'main',
Methods => {
'main' => {
DocString => "The main() method",
HelpContext => 10,
RetType => VT_I4,
TotalParams => 1,
NumOptionalParams => 0,
ParamList =>[ 'cmd_input' => VT_BSTR ]
},
}, # end of 'Methods'
Properties => {
}, # end of 'Properties'
); # end of %TypeLib
=end PerlCtrl
=cut
39
Chapter 10 Appendix 40
Revision History Sl.No. Description Version Date 1
Initial Version
1.0.0
7-Nov-2015
2
Section 3.1 and 8.1 are updated as per the new enhancement
1.1.0
12-Dec-2015
feature requirements (EAAR_PN0089_FR_0018,
EAAR_PN0089_FR_0019, EAAR_PN0089_NR_0010).
3
Reference section is updated with correct document name.
1.1.1
7-Apr-2016
4
R-Number corrected for the document
1.1.2
13-Jul-2016
5
Following changes are made,
1.1.3
17-Feb-2017
1. Updated notice and copyright information.
2. Updated R Number.
41
RUCG Tool User's Manual V1.1.3 Publication Date: Rev.1.01, February 17, 2017
Published by: Renesas Electronics Corporation
SALES OFFICES http://www.renesas.com Refer
to "http://www.renesas.com/" for the latest and de tailed information.
Renesas Electronics America Inc.
2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333
Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949
Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HAL II Stage, Indiranagar, Bangalore, India
Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141
© 2006-2017 Renesas Electronics Corporation. All rights reserved.
Colophon 4.1

RUCG Tool
User’s Manual
R20UT3754EJ0101
Document Outline