1 - Mcu Integration Manual

Integration Manual

For

Mcu

VERSION: 1

DATE: 07/09/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.DescriptionAuthorVersionDate
1Initial versionLucas Wendling107/09/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

AbbreviationDescription

References

This section lists the title & version of all the documents that are referred for development of this document

Sr. No.TitleVersion

Dependencies

This component relies on installation of the Renesas MCAL CodeGenerator utilitiy. Currently, this utility is required to be installed on the integrator’s component and this component assumes this utility is installed in the default installation directory. This places the executable in the “C:\Renesas\CodeGenerator\code_generator\MCALGenerator.exe” directory. This component requires version “2.06.03” of the MCAL Code Generator.

SWCs

ModuleRequired Feature

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

ModulesNotes

Configuration Files to be provided by Integration Project

N/A

Da Vinci Parameter Configuration Changes

ParameterNotesSWC

DaVinci Interrupt Configuration Changes

ISR NameNotes

Manual Configuration Changes

ConstantNotesSWC

Integration DATAFLOW REQUIREMENTS

Required Global Data Inputs

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.

InitScheduling RequirementsTrigger
RunnableScheduling RequirementsTrigger

.

Memory Map REQUIREMENTS

Mapping

Memory SectionContentsNotes

* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.

Usage

FeatureRAMROM

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>/*.c) do (

ECHO ..\generate\<MCAL_Component>\%%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>

2 - Mcu Peer Review Checklist


Overview

Summary Sheet
Synergy Project
3rd Party Files


Sheet 1: Summary Sheet























Rev 1.019-Apr-17
Peer Review Summary Sheet


























Synergy Project Name:



Windows User: Intended Use: Identify which component is being reviewed. This should match the component short name and the middle part of the Synergy project name Mcu
Revision / Baseline:


Windows User: Intended Use: Identify the implementation baseline name intended to be used for the changed component when changes are approved. Mcu_Renesas_P1MC_Ar4.0.3_1.1.0_HF3


























Change Owner:



Windows User: Intended Use: Identify the developer who made the change(s) being reviewed Rijvi Ahmed
Work CR ID:


Windows User: Intended Use: Identify the Implementation Work CR whose work is being reviewed (may be more than one) EA4#20480


























3rd party delivery package identifier:







Intended Use: This is a reference to the identifier of the 3rd party delivery package(s) that the component was extracted/created from. Rationale: This will allow easier tracing back to 3rd party deliveries. AUTOSAR_RH850_P1M-C_MCAL_Ver4.02.00.D_MCU_HF003_20180104


























Windows User: Identifiy which type of 3rd party component this is so as to provide appropriate review checklist sheets Component Type:





























































































































Windows User: General section for summarizing review comments or review notes. Review Checklist Summary:


















































Comments:


Only updated for the Hot Fix




























































Sheet 2: Synergy Project

Peer Review Meeting Log (Component Synergy Project Review)



















































Quality Check Items:




































Rationale is required for all answers of No










New baseline version name from Summary Sheet follows








Yes
Comments:




naming convention for 3rd Party Software Components







































Project contains necessary subprojects








N/A
Comments:













































Project contains the correct version of subprojects








N/A
Comments:













































General Notes / Comments:



























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Rijvi Ahmed


Review Date :

02/09/18
































Lead Peer Reviewer:


Jared


Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 3: 3rd Party Files

Peer Review Meeting Log (3rd Party File Review)





















































Quality Check Items:






































Rationale is required for all answers of No










(e.g. component_bswmd.arxml) Component "autosar" folder contains autosar module description file from 3rd party delivery packageN/A
Comments:




































(e.g. component_preo.arxml) Component "autosar" folder contains any relevant preconfiguration files from 3rd party delivery package(s)N/A
Comments:




































If needed as in the case with Renesas MCAL (e.g. MCALcomponent_bswmd_rec.arxml taken from Vector delivery) Component "autosar" folder contains any needed supplemental autosar module description file(s)N/A
Comments:




































Component "doc" folder contains all documentation related to this component from 3rd party delivery packageN/A
Comments:




































Modifications from delivery to be reviewed (e.g. path changes) Component "generate" folder contains all external generation files from 3rd party delivery packageYes
Comments:

Contains updated Template and Validate




files for MCU hotfix



























Component "include" and "src" folder contains exact component files from 3rd party delivery packageYes
Comments:




































Component "make" folder contains any makefiles included from 3rd party delivery packageN/A
Comments:




































1) All source and headers of component should be referenced in .gpj 2) Compiler settings may need to be tailored to source component (e.g. Renesas MCAL vs Vector BSWs) Component "tools" folder contains GHS project file with appropriate files referenced with appropriate compiler settingsN/A
Comments:




































Should delete old existing files/directories from integration project and copy new ones into integration project May also contain logic for integrator user interaction if required. (e.g. selection of micro variant on MCAL) Component "tools" folder contains Integrate.bat with appropriate logic in it for integration into projectN/A
Comments:




































For external generation and internal behavior definition for use with Vector Davinci tools. Typically only desired/needed for non-Vector developed components. This file should be copied as part of Integrate.bat. Components optionally contains settings xml file with appropriate contentsN/A
Comments:




































General Notes / Comments:





























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:



























Change Owner:

Rijvi Ahmed


Review Date :

02/09/18

































Lead Peer Reviewer:


Jared


Approved by Reviewer(s):



Yes
































Other Reviewer(s):











































































3 - R20UT3651EJ0100-AUTOSAR

AUTOSAR_MCU_Component_UserManual

5 - R20UT3651EJ0100-AUTOSARs




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AUTOSAR MCAL R4.0.3 
User’s Manual 
 
 
 
 
  
MCU Driver Component Ver.1.0.2 
 
 
Embedded User’s Manual 
 
 
 
Target Device: 
RH850\P1x-C
 
 
 
 
 
 
 
 
 
 
 
 
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.00 Jan 2017

 
 


 
 
 
 
 
 
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. 
 
 
 
 
 
 
 
 


 
 


 
Abbreviations and Acronyms 
 
Abbreviation / Acronym 
Description 
ADC 
Analog to Digital Converter 
ANSI 
American National Standards Institute 
API 
Application Programming Interface 
ATOM 
ARU-connected Timer Output Module 
AUTOSAR 
AUTomotive Open System ARchitecture 
CAN 
Control Area Network 
CLMA 
Clock Monitor  
CMU 
Clock Management Unit 
CVM 
Core Voltage Monitor 
DEM/Dem 
Diagnostic Event Manager 
DET/Det 
Development Error Tracer 
DIO 
Digital Input Output 
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 
GTM 
Generic Timer Module 
ICU 
Input Capture Unit 
ID/Id 
IDentifier 
I/O 
Input and Output 
KB 
Kilo Byte 
LIN 
Local Interconnect Network 
MCAL 
Microcontroller Abstraction Layer 
MCU/Mcu 
MicroController Unit 
NA 
Not Applicable 
NMI 
Non Maskable Interrupt 
OS/Os 
Operating System 
PWM 
Pulse Width Modulation 
PLL 
Phase Locked Loop 
RAM/Ram 
Random Access Memory 
ROM 
Read Only Memory 
RESF 
Reset Factor Register 
RTE 
Run Time Environment 
SPI 
Serial Peripheral Interface 
SW 
SoftWare 
TIM 
Timer Input Module 
WDT 
WatchDog Timer 
 
 
 


 
 
Definitions 
 
Term 
Represented by 
Sl. No. 
Serial Number 
 
 


 
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 
Chapter 4 
Forethoughts ................................................................... 19 
4.1. 
General...................................................................................................................................... 19 
4.2. 
Preconditions ........................................................................................................................... 19 
4.3. 
Data Consistency ..................................................................................................................... 20 
4.4. 
User Mode and Supervisor Mode ........................................................................................... 21 
4.5. 
Deviation Lists ......................................................................................................................... 22 
4.6. 
Register Write Verify ............................................................................................................... 23 
Chapter 5 
Architecture Details ........................................................ 25 
Chapter 6 
Registers Details ............................................................. 27 
Chapter 7  
Interaction Between The User And MCU Driver 
Component                                                                                              35 
7.1. 
Services Provided By MCU Driver Component to User ....................................................... 35 
Chapter 8  
MCU Driver Component Header And   Source File 
Description                                                                                               37 
Chapter 9 
Generation Tool Guide .................................................... 41 
Chapter 10 
Application Programming Interface .............................. 43 
10.1. 
Imported Types ........................................................................................................................ 43 
10.1.1. 
Standard Types ....................................................................................................... 43 
10.1.2. 
Other Module Types ................................................................................................ 43 
10.2. 
Type Definitions ....................................................................................................................... 43 
10.2.1. 
Mcu_ClockType ....................................................................................................... 43 
10.2.2. 
Mcu_RawResetType ............................................................................................... 43 
10.2.3. 
Mcu_ModeType ....................................................................................................... 43 
10.2.4. 
Mcu_RamSectionType ............................................................................................ 44 
10.2.5. 
Mcu_PllStatusTypes ................................................................................................ 44 
10.2.6. 
Mcu_RamStateType ................................................................................................ 44 
10.2.7. 
Mcu_ResetType ...................................................................................................... 44 
10.3. 
Function Definitions ................................................................................................................ 46 
10.3.1. 
Mcu_Init ................................................................................................................... 46 


 
10.3.2. 
Mcu_InitRamSection ............................................................................................... 47 
10.3.3. 
Mcu_InitClock .......................................................................................................... 47 
10.3.4. 
Mcu_DistributePllClock ........................................................................................... 48 
10.3.5. 
Mcu_GetPllStatus .................................................................................................... 48 
10.3.6. 
Mcu_GetResetReason ............................................................................................ 49 
10.3.7. 
Mcu_GetResetRawValue ........................................................................................ 49 
10.3.8. 
Mcu_PerformReset ................................................................................................. 50 
10.3.9. 
Mcu_SetMode ......................................................................................................... 50 
10.3.10. 
Mcu_GetVersionInfo ................................................................................................ 51 
10.3.11. 
Mcu_GetRamState .................................................................................................. 51 
Chapter 11 
Development And Production Errors ............................ 53 
11.1. 
MCU Driver Component Development Errors ....................................................................... 53 
11.2. 
MCU Driver Component Production Errors .......................................................................... 54 
Chapter 12 
Memory Organization ..................................................... 55 
Chapter 13 
P1x-C Specific Information ............................................ 57 
13.1. 
ISR Function ............................................................................................................................. 57 
13.1.1. 
Interrupt routines for OS .......................................................................................... 57 
13.2. 
Sample Application ................................................................................................................. 58 
13.2.1. 
Sample Application Structure .................................................................................. 58 
13.2.2. 
Building Sample Application ............................................................................... 60 
13.2.2.1 
Configuration Example ......................................................................... 60 
13.2.2.2 
Debugging The Sample Application ................................................... 60 
13.3. 
Memory and Throughput ........................................................................................................ 61 
13.3.1. 
ROM/RAM Usage .................................................................................................... 61 
13.3.2. 
Stack Depth ............................................................................................................. 62 
13.3.3. 
Throughput Details .................................................................................................. 62 
Chapter 14 
Release Details ................................................................ 65 
 
 
 
 
 
 
 
 
 


 
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 ........................................................ 55 
 
List of Tables 
 

Table 4-0 
Critical Section Details .............................................................................................. 21 
Table 4-1 
Supervisor Mode and User Mode Details ................................................................. 21 
Table 4-2 
MCU Driver Deviation List ......................................................................................... 22 
Table 6-1 
Register Details ......................................................................................................... 27 
Table 8-1 
Description of the MCU Driver Component Files ...................................................... 38 
Table 10-1 
API Provided by MCU Driver Component ................................................................. 46 
Table 11-1 
DET Errors of MCU Driver Component..................................................................... 53 
Table 11-2 
DEM Errors of MCU Driver Component .................................................................... 54 
Table 13-1 
ISR For MCU ............................................................................................................. 57 
Table 13-2 
ROM/RAM Details without DET ................................................................................ 62 
Table 13-3 
ROM/RAM Details with DET ..................................................................................... 62 
Table 13-3  
Throughput Details of the APIs ................................................................................. 63 
 
 
 
 


 
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-C 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
t
r
e
e
n
S
 
W
r
r
a
P
 
n
F
n
l
a
 
GP
MC
a
a
 
I
EEP
H
LI
CA
le
tc
C
RA
l

a
 
N
x
 
h
o
F
F
n
N Dr
R
    
T

d
re
M
la
l
 
a
d
D
I
P
a
CU
 
RO
A
 
D
o
D
D
P
g
 
s
s
le
r
y
W
 
DC
r
T
T
I
OR
r
h
h
i
r
v
 
i
D
 
i
 
O
v
D
iv
e
e
 
 
Dr
D
M
Dr
er
v
 
M
Dr
e
r
e
 
 
r
e
st
s
 
 
r
 
i
 
i
r
v
D
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
 
 
 
 
e
ive
 
r
r
r
r
 
 
 
 

 
 
 
 
 
 
 
 
 
M
E

 
G
WDT
C Po
U
Micro-  
xt
F
E
Cl
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
er 
 
 
 
or 
 
 
 
A
 
 
 
 
 
 
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 (P1x-C Specific 
This section provides P1x-C 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. 
Specification of MCU Driver (AUTOSAR_SWS_MCUDriver.pdf) 
3.2.0 
2. 
RH850/P1x-C Group Document User’s Manual: Hardware 
1.00 
(r01uh0517ej0100_rh850p1x-c_Open) 
3. 
Specification of Memory Mapping (AUTOSAR_SWS_MemoryMapping.pdf)  1.4.0 
4. 
Specification of Platform Types (AUTOSAR_SWS_PlatformTypes.pdf) 
2.5.0 
5. 
AUTOSAR BSW Makefile Interface 
0.3 
(AUTOSAR_BSW_MakefileInterface.pdf) 
6. 
Specification of Compiler Abstraction 
3.2.0 
(AUTOSAR_SWS_CompilerAbstraction.pdf) 
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 “R20UT3652EJ0100-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-C\modules\mcu\src 
                                                                                                                          \Mcu.c 
 
                                                                                                                          \Mcu_Ram.c 
 
                                                                                \Mcu_Irq.c 
 
                                                                                \Mcu_Version.c 
 
X1X\P1x-C\modules\mcu\include 
 
                                                                                  \Mcu.h 
 
                                                                                  \Mcu_Debug.h 
 
                                                                                  \Mcu_PBTypes.h 
 
                                                                                  \Mcu_Ram.h 
 
                                                                                  \Mcu_Irq.h 
 
                                                                                  \Mcu_Types.h 
 
                                                                                  \Mcu_Version.h 
 
                                                                                  Mcu_RegWrite.h 
 
 
X1X\P1x-C\modules\mcu\sample_application\<SubVariant>\make\ghs 
\App_MCU_P1x-C_Sample.mak 
 
X1X\P1x-C\modules\mcu\sample_application\<SubVariant>\make\ghs 
\App_MCU_P1x-C_Sample.ld 
 
X1X\P1x-C\modules\mcu\sample_application\<SubVariant>\obj 
 
 
X1X\P1x-C\modules\mcu\generator 
\R403_MCU_P1x-C_BSWMDT.arxml. 
17 

Chapter 3                                                                                               Integration And Build Process 
 
 
 
X1X\P1x-C\modules\mcu\user_manual 
 
(User manuals will be available in this folder) 
 
                     Note:    1. <AUTOSAR_version> should be 4.0.3. 
                     2. <SubVariant> can be P1H-C or P1H-CE or P1M-C.                                                                                                                   
 
 
 
 
 
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. 
 
•  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 state feature is enabled the API Mcu_InitRamSection follows this 
procedure: 
 
• Initializes all configured RAM sections according to user configuration. 
• Enables ECM interrupt generation for all configured RAM errors 
according to user configuration. 
The procedure requires that the complete RAM is initialized before the RAM 
state functionality is used. 
 
•  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 achive the same functionality. These containers have 
multiplicity 1 - 1 and have fixed values depends on the reset type. 
 
•  The parameter 'McuLoopCount' represents the number of register write 
retries in MCU module. User has to take care to provide a proper value 
for this parameter to avoid stabilization issues. The default value used for 
this parameter is 28, to avoid unwanted reporting of DEM due to 
stabilization issues. 
 
•  Support for CLMA4 is available only for P1H-C (Dual core) devices. 
 
 
4.2. 
Preconditions 
 
Following preconditions have to be adhered by the user, for proper 
19 

Chapter 4                                                                                                                           Forethoughts 
 
functioning of the MCU Driver Component: 
 
•  The Mcu_Cfg.h file 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 
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. 
 
•  The  user  shall  configure  the  exact  Module  Short  Name  Mcu  in 
configurations as specified in config.xml file and the same shall be given in 
command line. 
 
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. 
20 
 

 Forethoughts 
Chapter 4 
 
 
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 
called after the data is accessed. 
 
The following exclusive area along with scheduler services is used to provide 
data integrity for shared resources: 
MCU_REGISTER_PROTECTION 
MCU_PWR_MODE_PSC_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’. 
 
                          If the ‘McuCriticalSectionProtection’ parameter is enabled then the critical    
section protection is applicable to all these API’s in MCU Module: 
 
Table 4-1  Critical Section Details 
 
API Name 
Exclusive Area Type 
Protected Resources 
Mcu_Init 
MCU_REGISTER_PROTECTION 
Registers: 
ECMmnESSTC0  
DTMCTL 
 
Mcu_InitRamSectio
MCU_REGISTER_PROTECTION 
Registers: 

ECMmnESSTC0 
ECMmnESSTC1 
 
Mcu_GetRamState  VARIABLE_PROTECTION 
Shared Data: 
Global variable to store Ram 
state of MCU Driver 
Mcu_SetMode 
MCU_PWR_MODE_PSC_PROT
Registers: 
ECTION 
MSR_LM3,MSR_LM4, 
MSR_LM5,MSR_LM6, 
MSR_LM7,MSR_LM8, 
MSR_LM10,MSR_L11, 
MSR_LM12 
 
The highest measured duration of a critical section was 0.587 micro seconds measured 
for Mcu_Init API with a CPU frequency of 160 MHz.  
 
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 

Mcu_Init 


Critical section protection 
cannot be enabled  

Mcu_InitClock  




Mcu_DistributePllClock 



21 

Chapter 4                                                                                                                           Forethoughts 
 

Mcu_GetPllStatus 




Mcu_InitRamSection 


Critical section protection 
cannot be enabled 

Mcu_GetResetRawValue 




Mcu_GetVersionInfo 




Mcu_GetRamState 


Critical section protection 
cannot be enabled 

Mcu_SetMode 


1.The execution of the 
assembly instruction for 
entering HALT mode will 
not be possible 
2. Critical section 
protection cannot be 
enabled 
10 
Mcu_PerformReset 


 - 
 
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. 
 
4.5. 
Deviation Lists 
 
Table 4-3  MCU Driver Deviation List 
 
Sl. No. 
Description 
AUTOSAR Bugzilla / Mantis 

The parameter McuResetSetting 

from the sub-container 
McuModuleConfiguration is not 
considered. 

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. 

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. 

The parameter McuClockSettingId 
54536 
range in McuClockSettingConfig 
container is changed from “1 to 
255” to “0 to 255” since 0 is valid 
minimum value for clock setting 
ID. 

If an invalid database is passed as 

a parameter to API Mcu_Init, DET 
Error code 
MCU_E_INVALID_DATABASE is 
reported to DET. 
 
 
 
 
22 
 

 Forethoughts 
Chapter 4 
 
 
4.6. 
Register Write Verify 
 
 
Register write-verify is a functional safety based implementation, where the 
control registers’ write operation is verified straight away after the write 
operation. After writing to control registers, content of the registers are read 
back and verified against the expected content to make sure that register 
content has been written correctly.  
The main use of this implementation is to detect random HW faults 
(transient/permanent). This can happen on the bus while writing to the 
configuration registers which will potentially lead to wrong configuration and 
potentially wrong operation. Also it could happen because of faulty registers 
which will potentially lead to incorrect operation. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23 

Chapter 4                                                                                                                           Forethoughts 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 

                  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 Core Voltage Monitoring, Clock monitoring and Lock 
Step mechanism is possible in real scenario. 
 
•  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 
module also checks if the data base is flashed. 
25 

Chapter 5                                                                                                                Architecture Details 
 
 
 
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 Core Voltage Monitoring, Clock monitoring and Lock 
Step mechanism 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. 
 
Generic Timer Module  
P1x-C controller uses GTM HW core for timer related drivers.  
 
The Clock Management Unit is responsible for clock generation of the counters and of 
the GTM-IP. The CMU generate different clock sources for the whole GTM-IP. 
 
The Configurable Clock Generation subunit provides eight dedicated clock sources for 
the GTM submodules: TIM and ATOM.  
 
All the CMU clock initializations required for TIM and ATOM sub modules are done from 
the MCU module. The GTM CMU registers are provided in Chapter 6. 
 
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 
watchdog overflow. The limitation of this implementation is that this type of 
reset activation is possible only if the watchdog is configured in reset 
mode. If microcontroller reset is requested when the watchdog is 
configured in NMI mode, then an interrupt is generated which would not be 
handled in this driver component. 
 
To provide the reset reason, this sub module captures the information 
available with RESF - Reset factor register. This register contains reset 
information. 
 
HW BIST is executed by Power-On-Reset, System Reset 1 and 
SystemReset2. In System Reset 2, HW BIST execution can be disabled 
depending on Field BIST control register (BSEQ0CTL). 
 
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 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
Mcu_Init 
RESC 
McuEcmRstConfigure 

ECMnEMK0 

MCU_ECMEMK0_FULL_
MASK 
ECMnEMK1 

MCU_ECMEMK1_FULL_
MASK 
ECMnEMK2 

MCU_ECMEMK2_FULL_
MASK 
ECMnPS 


ECMnPCMD1 


CVMDEW 
McuCvmOutMaskFbist, 

McuCvmOutMaskDiag, 
McuCvmResetEnable 
ECMnEPCFG 
McuEcmErrorOutputMo MCU_ECM_ERROUT_MO
de 
DE 
ECMnMICFG0 
McuEcmErrorMaskableI

nterrupt 
ECMnMICFG1 
McuEcmErrorMaskableI

nterrupt 
ECMnMICFG2 
McuEcmErrorMaskableI

nterrupt 
ECMnNMICFG0 
McuEcmErrorNonMaska

bleInterrupt 
ECMnNMICFG1 
McuEcmErrorNonMaska

bleInterrupt 
ECMnNMICFG2 
McuEcmErrorNonMaska

bleInterrupt 
ECMnIRCFG0 
McuEcmErrorInternalRe

set 
ECMnIRCFG1 
McuEcmErrorInternalRe

set 
ECMnIRCFG2 
McuEcmErrorInternalRe

set 
ECMnDTMCTL 

MCU_ECM_DELAY_TIME
R_STOP 
ECMnDTMCMP 

MCU_ECM_DLYTIMER_V
ALUE 
ECMnDTMCFG0 
McuEcmErrorMIDelayTi

mer 
27 

  Chapter 6 
 
 
 
 
 
 
 
 
     Registers Details 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
ECMnDTMCFG1 
McuEcmErrorMIDelayTi

mer 
ECMnDTMCFG2 
McuEcmErrorMIDelayTi

mer 
ECMnDTMCFG3 
McuEcmErrorNMIDelay

Timer 
ECMnDTMCFG4 
McuEcmErrorNMIDelay

Timer 
ECMnDTMCFG5 
McuEcmErrorNMIDelay

Timer 
GTM0CMUCLKEN 

MCU_CMUCLK_DISABLE 
GTM0CMUGCLKNUM 

MCU_ZERO 
GTM0CMUGCLKDEN 

MCU_ZERO 
GTM0CMUCLK0CTRL 

MCU_ZERO 
GTM0CMUCLK1CTRL 

MCU_ZERO 
GTM0CMUCLK2CTRL 

MCU_ZERO 
GTM0CMUCLK3CTRL 

MCU_ZERO 
GTM0CMUCLK4CTRL 

MCU_ZERO 
GTM0CMUCLK5CTRL 

MCU_ZERO 
GTM0CMUCLK6CTRL 

MCU_ZERO 
GTM0CMUCLK7CTRL 

MCU_ZERO 
MSR _LM5 

MCU_ZERO 
RESF 
McuEcmRstConfigure 

RESFC 


CVMFC 
McuClma0SelfDiagnosti

cTest, 
McuClma1SelfDiagnosti
cTest, 
McuClma2SelfDiagnosti
cTest, 
McuClma3SelfDiagnosti
cTest, 
McuClma4SelfDiagnosti
cTest 
CVMF 
McuClma0SelfDiagnosti

cTest, 
McuClma1SelfDiagnosti
cTest, 
McuClma2SelfDiagnosti
cTest, 
McuClma3SelfDiagnosti
cTest, 
McuClma4SelfDiagnosti
cTest 
CVMDMASK 
McuCvmOutMaskDiag 

CVMDIAG 
McuClma0SelfDiagnosti

cTest, 
McuClma1SelfDiagnosti
cTest, 
McuClma2SelfDiagnosti
cTest, 
28 
McuClma3SelfDiagnosti
cTest, 
 
McuClma4SelfDiagnosti
cTest 

Registers Details 
Chapter 6 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
CVMMON 
McuCvmOutMaskDiag 

CMPTST0 
McuLockStepSelfDiagn
MCU_LOCKSTEP_DUMM
osticTest 
Y_VALUE 
CMPTST1 
McuLockStepSelfDiagn
MCU_LOCKSTEP_DUMM
osticTest 
Y_VALUE 
 ECMMnESSTR0 


  ECMnESSTC0 


  ECM0ESSTC1 


  ECM0ESSTC2 


  ECM0PS 


ECMMESSTR0 


ECMMESSTR1 


ECMMESSTR2 


ECMCESSTR0 


  ECMCESSTR1 


  ECMnPEM 


  ECM0PCMD1 


ECMCESSTR2 


CVMDE 
McuCvmDiagLockBit 

ECMnPE0 


ECMPCMD1 


ECMPE0 


ECMPS 


ECMESSTC0 


Mcu_InitRamSection 
ECMnMICFG0 
McuEcmErrorMaskableI

nterrupt 
ECMnMICFG1 
McuEcmErrorMaskableI

nterrupt 
ECMnNMICFG0 
McuEcmErrorNonMaska

bleInterrupt 
ECMnNMICFG1 
McuEcmErrorNonMaska

bleInterrupt 
ECMnIRCFG0 
McuEcmErrorNonMaska

bleInterrupt 
ECMnIRCFG1 
McuEcmErrorNonMaska

bleInterrupt 
ECMnEMK0 
McuEcmErrorNonMaska

bleInterrupt 
ECMnPS 


ECMnPCMD1 


ECMnESSTC0 


ECMnESSTC1 


ECMnESSTR0 


ECMnESSTR1 


ECMnEMK1 


29 

  Chapter 6 
 
 
 
 
 
 
 
 
     Registers Details 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
Mcu_InitClock 
CKSC0C 

ucSysClk0SelectedSrcCloc
 
k LucClkSrcClk 
 
 
CKSC0S 


 
CLKD0STAT 

 

CLKD0DIV 

 usSysClk0Divider   
LusClkDivider 
CLKD1STAT 


CLKD1DIV 

usSysClk1Divider   
LusClkDivider 
CKSC2C 

ucExtClk0SelectedSrcCloc
k LucClkSrcClk 
CKSC2S 

 

CLKD2STAT 

 

 
CLKD2DIV 

usExtClk0Divider       
 
LusClkDivider 
CKSC3C 

ucExtClk1SelectedSrcCloc
k LucClkSrcClk 
CKSC3S 

 

 
CLKD3STAT 


 
CLKD3DIV 

 
usExtClk1Divider      
LusClkDivider 
CLMA0CMPH 
McuClm0MonitoringCloc

kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA0CMPL 
McuClm0MonitoringCloc

kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA0CTL0 

MCU_ONE 
CLMA0PCMD 


CLMA0PS 


CLMA1CMPH 
McuClm1MonitoringCloc

kAccuracy, 
McuClm1SamplingClock
Accuracy 
CLMA1CMPL 
McuClm1MonitoringCloc

kAccuracy, 
McuClm1SamplingClock
Accuracy 
CLMA1CTL0 

MCU_ONE 
CLMA1PS 


CLMA1PCMD 


CLMA2CMPH 
McuClm2MonitoringCloc

kAccuracy, 
McuClm2SamplingClock
Accuracy 
CLMA2CMPL 
McuClm2MonitoringCloc

kAccuracy, 
McuClm2SamplingClock
Accuracy 
CLMA2CTL0 

MCU_ONE 
CLMA2PCMD 


30 
 

Registers Details 
Chapter 6 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
CLMA2PS 


CLMA3CMPH 
McuClm3MonitoringCloc

kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA3CMPL 
McuClm3MonitoringCloc

kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA3CTL0 

MCU_ONE 
CLMA3PCMD 


CLMA3PS 


CLMA4CMPH 
McuClm3MonitoringCloc CLMA4CMPH 
kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA4CMPL 
McuClm3MonitoringCloc CLMA4CMPL 
kAccuracy, 
McuClm0SamplingClock
Accuracy 
CLMA4CTL0 

CLMA4CTL0 
CLMA4PCMD 

CLMA4PCMD 
CLMA4PS 

CLMA4PS 
CLMATESTS 


CLMATESTS 
CLMATEST 


CL
G MA
TM0TE
C S
M TS
UG  
CLKNUM 
McuGTMCMUGCLKNu

merator 
GTM0CMUGCLKDEN 
McuGTMCMUGCLKDe

nominator 
GTM0CMUCLKxCTRL 
McuGTMChannelClkSrc

Divider 
GTM0CMUCLKEN 

MCU_CMUCLK_ENABLE 
GTM0GTMIRQMODE 
 
  MCU_ZERO 
Mcu_DistributePllClo



ck 
Mcu_GetPllStatus 



Mcu_GetResetReason 



Mcu_GetResetRawVal



ue 
Mcu_PerformReset 
SWSRESA0 

MCU_ONE 
 
SWARESA0 

MCU_ONE 
 
 
 
MSR_LM3 
McuMcanStopTrigger, 
MCU_TARGET_STOP_TR
 
McuMcanWakeupTrigge IGGER, 
 

MCU_TARGET_WAKEUP
 
_TRIGGER 
31 

  Chapter 6 
 
 
 
 
 
 
 
 
     Registers Details 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
 
MSR_LM4 
McuFlexrayStopTrigger,  MCU_TARGET_STOP_TR
 
McuFlexrayWakeupTrig IGGER, 
 
ger 
MCU_TARGET_WAKEUP
 
_TRIGGER 
 
MSR_LM5 
 McuGtmStopTrigger,    
MCU_TARGET_STOP_TR
 
McuGtmWakeupTrigger  IGGER, 
 
MCU_TARGET_WAKEUP
 
_TRIGGER 
 
MSR_LM6 
McuEthernetStopTrigger MCU_TARGET_STOP_TR
 
,McuEthernetWakeupTri IGGER, 
 
gger 
MCU_TARGET_WAKEUP
 
_TRIGGER 
 
 
MSR_LM7 
McuRsentStopTrigger, 
MCU_TARGET_STOP_TR
IGGER, 
 
McuRsentWakeupTrigg
er 
MCU_TARGET_WAKEUP
 
_TRIGGER 
 
 
MSR _LM8 
McuHsUsrtStopTrigger,  MCU_TARGET_STOP_TR
 
McuHsUsrtWakeupTrigg IGGER, 
 
er 
MCU_TARGET_WAKEUP
 
_TRIGGER 
Mcu_SetMode 
MSR _LM10 
McuCsihStopTrigger, 
MCU_TARGET_STOP_TR
McuCsihWakeupTrigger  IGGER, 
MCU_TARGET_WAKEUP
_TRIGGER 
MSR _LM11 
McuRlin3StopTrigger, 
MCU_TARGET_STOP_TR
McuRlin3WakeupTrigge IGGER, 

MCU_TARGET_WAKEUP
_TRIGGER 
MSR _LM12 
McuAdcStopTrigger, 
MCU_TARGET_STOP_TR
McuAdcWakeupTrigger  IGGER, 
MCU_TARGET_WAKEUP
_TRIGGER 
SWLRESS3 


SWLRESS4 


SWLRESS5 


SWLRESS6 


SWLRESS7 


SWLRESS8 


SWLRESS10 


SWLRESS11 


SWLRESS12 


32 
 

Registers Details 
Chapter 6 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
EIC0, EIC1, EIC2, EIC3, 


EIC8, EIC9, EIC32, 
EIC33, EIC34, EIC35, 
EIC36, EIC38, EIC39, 
EIC41, EIC42, EIC53, 
EIC54, EIC61, EIC62, 
EIC83, EIC87, EIC91, 
EIC111, EIC114, 
EIC128, EIC129, 
EIC130, EIC131, 
EIC132, EIC141, 
EIC142, EIC174, 
EIC177, EIC184, 
EIC186, EIC197, 
EIC209, EIC211, 
EIC240, EIC241, 
EIC242, EIC243, 
EIC244, EIC245 
IMR0 
McuWakeUpFactorNam


IMR1 
McuWakeUpFactorNam


IMR2 
McuWakeUpFactorNam


IMR3 
McuWakeUpFactorNam


IMR4 
McuWakeUpFactorNam


IMR5 
McuWakeUpFactorNam


IMR6 
McuWakeUpFactorNam


IMR7   
McuWakeUpFactorNam


Mcu_ResetReasonStor RESF 



RESFC 

MCU_RESF_CLEAR 
 
ECMMESSTR0 


 
ECMCESSTR0 

 

 
ECM0ESSTC0 


 
ECM0PCMD1 


ECM0PS 


ECMMESSTR1 


ECMCESSTR1 


ECM0ESSTC1 


ECMMESSTR2 


ECMCESSTR2 


ECM0ESSTC2 


33 

  Chapter 6 
 
 
 
 
 
 
 
 
     Registers Details 
 
API Name 
Registers 
Config Parameter 
Macro/Variable 
Mcu_WakeupConfigure  EIC0, EIC1, EIC2, EIC3, 

MCU_WAKEUP_INTP_MA
EIC8, EIC9, EIC32, EIC33, 
SK 
EIC34, EIC35, EIC36, 
EIC38, EIC39, EIC41, 
EIC42, EIC53, EIC54, 
EIC61, EIC62, EIC83, 
EIC87, EIC91, EIC111, 
EIC114, EIC128, EIC129, 
EIC130, EIC131, EIC132, 
EIC141, EIC142, EIC174, 
EIC177, EIC184, EIC186, 
EIC197, EIC209, EIC211, 
EIC240, EIC241, EIC242, 
EIC243, EIC244, EIC245 
IMR0 
McuWakeUpFactorNam


IMR1 
McuWakeUpFactorNam

 

 IMR2 
McuWakeUpFactorNam

 

 
IMR3 
McuWakeUpFactorNam


IMR4 
McuWakeUpFactorNam
 

IMR5 
McuWakeUpFactorNam


IMR6 
McuWakeUpFactorNam


IMR7   
McuWakeUpFactorNam


Mcu_GetRamState 



 
 
 
 
 
 
 
 
 
 
 
 
 
34 
 

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 Initialize the ECM, EVM, 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. 
 
35 

 Chapter 7 
 
 
          Interaction Between The User And MCU Driver Component 
 
 
36 
 

    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_Hardware.h 
•  Mcu_Cbk.h 
 
 
The C source file generated by MCU Driver Generation Tool: 
 
•  Mcu_PBcfg.c 
•  Mcu_Hardware.c 
 
The MCU Driver Component C header files: 
 
•  Mcu.h 
•  Mcu_Irq.h 
•  Mcu_Debug.h 
•  Mcu_PBTypes.h 
•  Mcu_Ram.h 
•  Mcu_Types.h 
•  Mcu_Version.h 
•  Mcu_RegWrite.h 
 
The MCU Driver Component source files: 
 
•  Mcu.c 
•  Mcu_Ram.c 
•  Mcu_Version.c 
•  Mcu_Irq.c 
 
The Stub C header files: 
 
•  Compiler.h 
•  Compiler_Cfg.h 
•  MemMap.h 
•  Platform_Types.h 
•  Std_Types.h 
•  rh850_Types.h  
•  Os.h 
•  Dem.h 
•  Dem_Cfg.h 
•  Det.h 
•  SchM_Mcu.h 
 
 
The Stub C source files: 
•  Dem.c 
•  Det.c 
•  Os.c 
•  SchM_Mcu.c  
 
 
37 
 

 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 Generation Tool for various MCU 
Driver Component pre-compile time parameters. The macros and the 
parameters generated will vary with respect to the configuration in the input 
ARXML file. 
Mcu_Hardware.h 
This file contains the #define macros for the hardware registers to be used by 
the driver. 
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_Hardware.c 
This file contains the reference objects for the hardware register structure which is 
defined in device header file. 
Mcu.h 
This file provides extern declarations for all the MCU Driver Component 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 Component. 
Mcu_Types.h 
This file provides data structure and type definitions for initialization of MCU Driver. 
Mcu_Irq.h 
This file contains the extern declaration of ISR routines. 
Mcu_Debug.h 
This file provides Provision of global variables for debugging purpose. 
Mcu_PBTypes.h 
This file contains the data structure definitions of clock setting and Mode setting. 
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_RegWrite.h 
This file contains macro for register write verify check 
Mcu.c 
This file contains the implementation of all APIs. 
Mcu_Ram.c 
This file contains the global variables used by MCU Driver Component. 
Mcu_Irq.c 
This file contains the definition of ISR routines  
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 to map 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 contains platform dependent types declaration. 
Os.h 
This file contains macro definitions of OS component. 
Std_Types.h 
  This file contains macro definitions of Standard Types. 
Rte.h 
 
  This file contains macro definitions of RTE component. 
SchM_Mcu.h 
  This file contains the external declaration of scheduler services of MCU module. 
Dem.h 
  This file contains the external declaration of DEM Error Status function 
Dem_Cfg.h 
  This file contains macro definitions of DemEventParameters. 
38 
 

    MCU Driver Component Header And Source File Description 
 
 
      Chapter 8 
Det.h 
  This file contains the external declaration of DET Report Error function and    
structure definition of DET Error. 
 
 
 
Det.c 
  This file contains the definition of DET Report Error function and structure 
definition of DET Error. 
Dem.c 
  This file contains the  definition of DEM Error Status function 
Os.c 
This file is a stub for OS component and contains the definition of the OS category 
interrupts subroutines. 
SchM_Mcu.c 
This file is a stub for SchM Component and contains the definition of the exclusive 
 
areas for the scheduler services, which are used to provide data integrity for shared 
resources. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39 
 

 Chapter 8 
 
 
          MCU Driver Component Header And Source File Description 
 
 
 
 
 
40 
 

Generation Tool Guide 
Chapter 9 
 
 
Chapter 9 
Generation Tool Guide 
 
 
For more information on the MCU Driver Code Generation Tool, please refer 
“R20UT3652EJ0100-AUTOSAR.pdf”. 
 
 
 
 
 
 
 
 
 
 
 
 
 
41 

Chapter 9                                                                                                          G eneration Tool Guide
 

 
 
42 
 

  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_types.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: 
0 to 255 
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. 
 
10.2.3.  Mcu_ModeType 
 
Name: 
Mcu_ModeType 
Type: 
uint8 
Range: 
0 to 255 
Description: 
Type definition for Mcu_ModeType used by the API Mcu_SetMode. 
     
43 

  Chapter 10                                                                                   Application Programm ing Interface 
 
Note:   As per CPU Manual Mcu_SetMode API is not supporting for any standby mode. 
            Hence the Mcu_ModeType parameter is unused for P1x-C MCU module implementation. 
10.2.4.  Mcu_RamSectionType 
 
Name: 
Mcu_RamSectionType 
Type: 
Uint32 
Range: 
0 to 4294967295 
Description: 
Type definition for Mcu_RamSectionType used by the API Mcu_InitRamSection. 
 
10.2.5.  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 does not support the PLL clock implementation. 
Hence Mcu_GetPllStatus always returns MCU_PLL_LOCKED Status. 
 
10.2.6.  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 valid. 
Range: 
MCU_RAMSTATE_VALID 
RAM State is invalid. 
Description: 
Status value returned by the API Mcu_GetRamState 
 
10.2.7.  Mcu_ResetType 
 
Name: 
Mcu_ResetType 
Type: 
  Enumeration 
Range: 
  MCU_POWER_ON_RESET 
 
  MCU_TERMINAL_RESET 
 
  MCU_CVM_RESET 
  MCU_SW_SYS_RESET 
  MCU_WATCHDOG_RESET 
  MCU_LOCK_STEP_CORE_RST 
  MCU_PBUS_FSS_RST 
  MCU_BUS_BRIDGE_ERROR_RST 
  MCU_SAFETY_MECH_COMP_RST 
  MCU_TEMPERATURE_SENSOR_RST 
  MCU_CLMA0_RST 
44 
 

  Application Programming Interface   
 
 
 
 
 
    Chapter 10 
 
  MCU_CLMA2_RST 
  MCU_CLMA3_RST 
  MCU_CLMA5_RST 
  MCU_CLMA1_RST 
  MCU_LRAM_ECC_DED_RST 
  MCU_GRAM_ECC_DED_RST 
  MCU_CACHE_RAM_EDC_RST 
  MCU_CODE_FLS_ECC_DED_RST 
  MCU_DATA_FLS_ECC_DED_RST 
  MCU_CSIH_RAM_ECC_DED_RST 
  MCU_CAN_RAM_ECC_DED_RST 
  MCU_ETH_RAM_ECC_DED_RST 
  MCU_FR_RAM_ECC_DED_RST 
  MCU_GTM_RAM_ECC_DED_RST 
  MCU_BUS_ECC_DED_RST 
  MCU_BUS_ECC_SED_RST 
  MCU_LRAM_ADDR_OVF_RST 
  MCU_GRAM_ADDR_OVF_RST 
  MCU_CODE_FLS_ADDR_OVF_RST 
  MCU_DATA_FLS_ADDR_OVF_RST 
  MCU_PERI_RAM_ECC_ADDR_OVF_RST 
  MCU_DTS_RAM_ECC_DED_RST 
  MCU_DTS_RAM_ECC_SED_RST 
  MCU_LRAM_ECC_SED_RST 
  MCU_GRAM_ECC_SED_RST 
  MCU_CODE_FLS_ECC_SED_RST 
  MCU_DATA_FLS_ECC_SED_RST 
  MCU_CSIH_RAM_ECC_SED_RST 
  MCU_CAN_RAM_ECC_SED_RST 
  MCU_ETH_RAM_ECC_SED_RST 
  MCU_FR_RAM_ECC_SED_RST 
  MCU_GTM_RAM_ECC_SED_RST 
  MCU_PE_GUARD_RST 
  MCU_GRAM_GUARD_RST 
  MCU_MEMC_GUARD_RST 
  MCU_SLAVE_GUARD_RST 
  MCU_CODE_FLS_PE_UNMAP_ACCESS_RST 
  MCU_GRAM_PE_UNMAP_ACCESS_RST 
  MCU_LPB_PE_UNMAP_ACCESS_RST 
  MCU_PBUS_UNMAP_ACCESS_RST 
  MCU_HBUS_UNMAP_ACCESS_RST 
  MCU_CODE_FLS_GVCI_UNMAP_ACCESS_RST 
  MCU_GRAM_FLS_GVCI_UNMAP_ACCESS_RST 
  MCU_RES_HBUS_UNMAP_ACCESS_RST 
  MCU_DMA_TRANSFER_RST 
45 

  Chapter 10                                                                                   Application Programm ing Interface 
 
  MCU_DMA_UNMAPPED_RST 
  MCU_FLS_SEQUENCE_RST 
  MCU_FLS_FACI_RST 
  MCU_ADC_PARITY_RST 
  MCU_PE_UNINTEN_EN_DIS_RST 
  MCU_UNINTEN_DEACT_USR_RST 
  MCU_UNINTEN_ACT_CFP_MODE_RST 
  MCU_UNINTEN_DEBUG_EN_DET_RST 
  MCU_UNINTEN_ACT_TESTMODE_RST 
  MCU_ECM_COMP_RST 
  MCU_DEBUGGER_RESET 
  MCU_SW_APPL_RESET 
 MCU_BIST_RESET 
  MCU_RESET_UNDEFINED 
  MCU_RESET_UNKNOWN 
   Description: 
Type of reset supported by the hardware 
                                         
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_GetVersionInfo 
9. 
Mcu_PerformReset 
10. 
Mcu_SetMode 
11 
Mcu_GetRamState 
 
 
 
10.3.1. 
Mcu_Init 
 
Name: 
Mcu_Init 
 
FUNC(void, MCU_PUBLIC_CODE) Mcu_Init (P2CONST(Mcu_ConfigType, 
 Prototype: 
AUTOMATIC, MCU_APPL_CONST) ConfigPtr) 
 
Prototype:
Service ID  
: 
0x00 
Sync/Async: 
Synchronous 
Reentrancy: 
Non-Reentrant 
 
Type 
Parameter 
Value/Range 
 
Mcu_ConfigType 
ConfigPtr 
NA 
Parameters In: 
46 
 

  Application Programming Interface   
 
 
 
 
 
    Chapter 10 
 
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 
 
 
Prototype: 
FUNC(Std_ReturnType,  MCU_PUBLIC_CODE) Mcu_InitRamSection  
Mcu_RamSectionType RamSection) 
Service ID: 
0x01 
Sync/Async: 
Synchronous 
Reentrancy: 
Non-Reentrant 
 
Type 
Parameter 
Value/Range 
 
Mcu_RamSectionType 
RamSection 
NA 
Parameters In: 
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 
 
10.3.3. 
Mcu_InitClock 
 
Name: 
Mcu_InitClock 
 
 
Prototype: 
FUNC(Std_ReturnType, MCU_PUBLIC_CODE) Mcu_InitClock 
(Mcu_ClockType ClockSetting) 
Service ID: 
0x02 
Sync/Async: 
Synchronous 
Reentrancy: 
Non-Reentrant 
 
Type 
Parameter 
Value/Range 
 
Mcu_ClockType 
ClockSetting 
NA 
Parameters In: 
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: 
47 

  Chapter 10                                                                                   Application Programm ing Interface 
 
Preconditions: 
None 
 
10.3.4. 
Mcu_DistributePllClock 
 
Name: 
Mcu_DistributePllClock 
 
 
Prototype: 
FUNC(void, MCU_PUBLIC_CODE) Mcu_DistributePllClock (void) 
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: 
Std_ReturnType 
E_OK, E_NOT_OK 
Description: 
This service activates the PLL clock to the MCU clock distribution 
Configuration 
None 
Dependency: 
Preconditions: 
None 
 
 
10.3.5. 
Mcu_GetPllStatus 
 
Name: 
Mcu_GetPllStatus 
 
 
Prototype: 
FUNC(Mcu_PllStatusType, MCU_PUBLIC_CODE) Mcu_GetPllStatus (void) 
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_UNLOCKED, 
MCU_PLL_STATUS_UNDEFINED 
Description: 
This service provides the lock status of the PLL 
Configuration 
None 
Dependency: 
Preconditions: 
None 
 
 
 
48 
 

  Application Programming Interface   
 
 
 
 
 
    Chapter 10 
 
 
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 
 
 
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 
 
 
 
49 

  Chapter 10                                                                                   Application Programm ing Interface 
 
 
10.3.8. 
Mcu_PerformReset 
 
Name: 
Mcu_PerformReset 
 
 
Prototype: 
FUNC (void, MCU_PUBLIC_CODE) Mcu_PerformReset (void) 
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 
 
 
10.3.9. 
Mcu_SetMode 
 
Name: 
Mcu_SetMode 
 
 
Prototype: 
FUNC (void, MCU_PUBLIC_CODE) Mcu_SetMode (Mcu_ModeType McuMode) 
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 
 
 
50 
 

  Application Programming Interface   
 
 
 
 
 
    Chapter 10 
 
10.3.10. 
Mcu_GetVersionInfo 
 
Name: 
Mcu_GetVersionInfo 
 
 
Prototype: 
FUNC(void, MCU_PUBLIC_CODE) Mcu_GetVersionInfo 
(P2VAR(Std_VersionInfoType, AUTOMATIC, MCU_APPL_CONST) 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 
 
10.3.11. 
Mcu_GetRamState 
 
Name: 
Mcu_GetRamState 
 
 
Prototype: 
FUNC(Mcu_RamStateType, MCU_PUBLIC_CODE) Mcu_GetRamState (void) 
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_INVALID = 0, 
 MCU_RAMSTATE_VALID 
Description: 
This service provides the a  
ctual status of the microcontroller RAM area 
Configuration 
None 
Dependency: 
Preconditions: 
None 
 
 
 
 
51 

  Chapter 10                                                                                   Application Programm ing Interface 
 
 
52 
 

   Development And Production Errors                                                                         Chapter 11 
 
 
 Chapter 11  Development And Production Errors 
 
 
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 Mcu_Init is called with NULL PTR. 
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_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. 
5 
Error Code 
MCU_E_PARAM_POINTER 
Related API(s) 
Mcu_GetVersionInfo 
Source of Error 
When Mcu_GetVersionInfo is called with NULL PTR. 
Sl. No. 
6 
Error Code 
MCU_E_PARAM_MODE 
Related API(s) 
Mcu_SetMode 
Source of Error 
When McuMode is not within the settings defined in the configuration data structure. 
Sl. No. 
7 
Error Code 
MCU_E_INVALID_DATABASE 
Related API(s) 
Mcu_Init 
Source of Error 
When the API is invoked with no database. 
53 

   Chapter 11    
 
 
 
 
 
Development And Production Errors 
 
 
 
 
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_ProtectedWrite 
Source of Error 
When writing to a write-protected register fails 
Sl. No. 
3 
Error Code 
MCU_E_POWER_DOWN_MODE_FAILURE 
Related API(s) 
Mcu_SetMode 
Source of Error 
When there is failure in low power mode transition. 
Sl. No. 

 Error Code 
MCU_E_INT_INCONSISTENT 
 Related API(s) 
MCU_ECM_EIC_ISR 
Source of Error 
When there is failure in interrupt consistency check. 
Sl. No. 

 Error Code 
MCU_E_REG_WRITE_VERIFY 
 Related API(s) 
Mcu_Init, Mcu_InitRamSection, Mcu_InitClock, Mcu_SetMode, 
MCU_ECM_EIC_ISR, 
Source of Error 
MC
W U_F
he
EI
n therNT
e
_IS
 is a f R
a  
ilure in Register write. 
Sl. No. 
6 
Error Code 
MCU_E_CLM_SELFDIAG_FAILURE 
Related API(s) 
Mcu_InitClock 
Source of Error 
When there is failure in Clock Monitor Self Diagnosis 
Sl. No. 
7 
Error Code 
MCU_E_CVM_SELFDIAG_FAILURE 
Related API(s) 
Mcu_Init 
Source of Error 
When there is failure in CVM Self Diagnosis 
Sl. No. 
8 
Error Code 
MCU_E_ECM_SELFDIAG_FAILURE 
Related API(s) 
Mcu_Init 
Source of Error 
When there is failure in ECM Self Diagnosis 
Sl. No. 
9 
Error Code 
MCU_E_LOCKSTEP_SELFDIAG_FAILURE 
Related API(s) 
Mcu_Init 
Source of Error 
When there is failure in Lockstep Self Diagnosis 
54 
 

   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 Section 
 
Library / Object Files 
 
 
 
Global RAM of unspecific size required for 
 
MCU driver functioning. 
 
MCU Driver code related to APIs is placed in 
Y1 
Segment Name: 
this memory. 
 
NOINIT_RAM_UNSPECIFIED 
 
X1 
 
Segment Name: 
X1 
 
MCU PUBLIC_CODE_ROM 
Global 8-bit RAM initialized by MCU Driver. 
 
 
Segment Name: 
Y2 
 
NOINIT_RAM_8BIT 
MCU Driver code related to internal 
 
functions are placed in this memory 
 
 
X2 
Global 8-bit RAM to be initialized by start-
Segment Name: 
 
up code 
MCU_PRIVATE_CODE_ROM 
 
 
Y3 
Segment Name: 
 
RAM_8BIT 
 
 
 
Tool Generated Files 
 
 
 
Global RAM of unspecific 
 
The const section in the file Mcu_Pbcfg.c 
size required for MCU Driver 
is placed in this memory. 
 
functioning. The Generation 
Segment Name: 
tool allocates this RAM. 
 
 
X4
Y4 
 Segment Name: 
CONST_ROM_UNSPECIFIED 
 

MCU_CFG_RAM_UNSPEC
 
IFIED 
 
 
The const section (for MCU configuration 
 
structure of type “Mcu_ConfigType”) in 
the file Mcu_PBcfg.c is placed in this 
 
  memory. 
X5 
 
 Segment Name: 
MCU_CFG_DBTOC_UNSPECIFIED  
 
 
 
 
The const section (other than 
 
MCU Configuration structure) in the file 
Mcu_PBcfg.c is placed in this memory. 
 
Segmentname: 
X6 
 
 
MCU_CFG_DATA_UNSPECIFIED 
 
 
 
 
 
 
 
Figure 12-1  MCU Driver Component Memory Organization 
 
55 

  
  Chapter 12                                                                                                         Memory Organization                                                                                                
 
 
 
ROM Section (X1, X2, X3, X4 and X5): 
 
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_CFG_DBTOC_UNSPECIFIED (X4): This section consists of MCU 
Driver Component database table of contents generated by the MCU Driver 
Component Generation Tool. This can be located in code memory. 
 
MCU_CFG_DATA_UNSPECIFIED (X5): This section consists of MCU 
Driver Component constant configuration structures. This can be located in 
code memory. 
 
CONST_ROM_UNSPECIFIED (X6): This section consists of MCU Driver 
Component constant structures used for function pointers in MCU Driver 
Component. This can be located in code memory. 
 
RAM Section (Y1, Y2, Y3 and Y4): 
 
NOINIT_RAM_UNSPECIFIED (Y1): This section consists of the global RAM 
pointer variables that are used internally by MCU Driver Component. This can 
be located in data memory. 
 
NOINIT_RAM_8BIT (Y2): This section consists of the global RAM variables of 
8-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. 
 
MCU_CFG_RAM_UNSPECIFIED (Y4): This section consists of the global 
RAM variables that are generated by MCU Driver Component Generation 
Tool. This can be located in data memory. 
 
      Remark 
 
  X1, X2, Y1, Y2 and Y3 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 
 
 
 
 
56 
 

  P1x-C Specific Information                                                                                               Chapter 13 
 
Chapter 13  P1x-C Specific Information 
 
 
P1x-C supports following devices: 
  R7F701370A(CPU1(PE1)), R7F701371(CPU1(PE1)), 
R7F701372(CPU1(PE1)), R7F701373, R7F701374 
 
 
 
13.1.  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: 
 
 
Table 13-1  ISR For MCU 

 
Interrupt Source 
Name of the ISR Function 
 
MCU_FEINT_ISR 
INTECM 
MCU_ECM_EIC_ISR 
 
 
13.1.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 */ 
57 


  Chapter 13                                                                                             P1x-C Specific Information 
 
#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) 
/* Defines the CAT1 interrupt mapping */ 
#else 
_INTERRUPT_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.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. 
 
 
 

G eneri c 
 
 
A U T O S A R 
R H 8 5 0 
T Y P E S 
C O M P I L E R 
T Y P E S 
 
 
D evices 
 
 
 
 
 
 
 
 
P 1 x-C 
 
 
 
 
 
M C U 
S T U B 
S T U B 
S T U B 
S T U B 
S ample 
                                                                   Application 
D e t 
D e m 
S chM 
O s
 
 
 
 
Figure 13-1 
Overview of MCU Driver Sample Application 
 
58 
 

     P1x-C Specific Information  
 
 
 
 
                             Chapter 13  
 
The Sample Application of the P1x-C is available in the path 
 
X1X\P1x-C\modules\mcu\sample_application 
 
The Sample Application consists of the following folder structure: 
 
X1X\P1x-C\modules\mcu\definition\<AUTOSAR_version>\common 
                                         R403_MCU_P1X-C.arxml 
 
X1X\P1x-C\modules\mcu\sample_application\< SubVariant>  
                                                                             
                                                                     \<AUTOSAR_version> 
\src\Mcu_PBcfg.c 
\src\Mcu_Hardware.c 
\include\Mcu_Cfg.h 
                                                                                                          \include\Mcu_Hardware.h 
 
 
                                                                \config\ App_MCU_P1x-C_701370A_Sample.arxml 
                                                                 \config\App_MCU_P1x-C_701370A_Sample.html 
                                                                 \config\App_MCU_P1x-C_701370A_Sample.one 
 
                                                                 \config\ App_MCU_P1x-C_701371_Sample.arxml 
                                                                 \config\ App_MCU_P1x-C_701371_Sample.html 
                                                                  \config\ App_MCU_P1x-C_701371_Sample.one 
 
                                                                 \config\ App_MCU_P1x-C_701372_Sample.arxml 
                                                                 \config\ App_MCU_P1x-C_701372_Sample.html 
                                                                  \config\ App_MCU_P1x-C_701372_Sample.one 
 
                                                                  \config\ App_MCU_P1x-C_701373_Sample.arxml 
                                                                  \config\ App_MCU_P1x-C_701373_Sample.html 
                                                                  \config\ App_MCU_P1x-C_701373_Sample.one 
 
                                                                  \config\ App_MCU_P1x-C_701374_Sample.arxml 
                                                                  \config\ App_MCU_P1x-C_701374_Sample.html 
                                                                  \config\ App_MCU_P1x-C_701374_Sample.one 
 
 
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. 
 
 
•  The API Mcu_GetPllStatus is invoked to provide the lock status of the 
PLL. This API will return the PLL status as MCU_PLL_LOCKED or 
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. 
59 

  Chapter 13                                                                                                  P1x-C Specific Information 
 
• 
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 is invoked to reset the microcontroller 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 ’ 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. 
 
•  For Autosar Version R4.0.3 
 
Configuration Details: 
 App_MCU_<SubVariant>_<Device_Name>_Sample.html 
Note 
For P1x-C <Device_name> can be 701370A, 701371, 701372, 701373, 
701374. 
 
 
13.2.2.2  Debugging The Sample Application 
 
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-C\common_family\Sample_Application\<Complier>” 
 
Now execute batch file SampleApp.bat with following parameters: 
SampleApp.bat Mcu <Device_name> 
Note 
For P1x-C <Device_name> can be 701370A, 701371, 701372, 701373, 
701374. 
 
After this, the tool output files will be generated with the configuration as 
mentioned in the path: 
•  For Autosar Version R4.0.3 
“X1X\P1x-C\modules\Mcu\sample_application\<SubVariant>\< 
     AUTOSAR_version> \config” 
 
•  After this, all the object files, map file and the executable file 
App_MCU_P1x-C_Sample.out will be available in the output folder 
(“X1X\P1x-
C\modules\Mcu\sample_application\<SubVariant>\obj\<complier>” in this 
case). 
 
  60 
 

     P1x-C Specific Information  
 
 
 
 
                             Chapter 13  
•  The executable can be loaded into the debugger and the sample application 
can be executed. 
 
 
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 file. 
“X1X\P1x-
C\modules\Mcu\sample_application\<SubVariant>\<Autosar_versio
n>\config\App_MCU_<SubVariant>_<Device_name>_Sample.arx
ml” the database alone can be generated by using the following 
commands 
make –f App_MCU_<SubVariant>_Sample.mak generate_Mcu_config 
  make –f App_MCU_<SubVariant>_Sample.mak 
App_MCU_<SubVariant>_Sample.out 
• 
After this, a flash able Motorola S-Record file 
App_MCU_<SubVariant>_Sample.run is available in the output folder. 
 
Note 
1.For P1x-C <Device_name> can be 701370A,   
   701371,701372, 701373, 701374. 
              2. <compiler> for example can be “ghs”. 
              3. <SubVariant> can be P1H-C, P1H-CE, P1M-C. 
              4. <AUTOSAR_version> can be 4.0.3. 
  
 
13.3.  Memory and Throughput  
 
Typical Configuration 
  DET ON 
  All other Pre-Compile Settings ON 
  RAM Sector Configuration0 
o  Default Value 0xFF 
o  RAM Section Base Address 0xFEDE0000 
o  RAM Section Size 0x40 
 
13.3.1. 
ROM/RAM Usage 
 
The details of memory usage for the typical configuration, with DET disabled  
are provided in this section. 
 
 
 
 
 
 
 
 
 
 
 
61 

  Chapter 13                                                                                                  P1x-C Specific Information 
Table 13-2  ROM/RAM Details without DET 
 
 
 
 
Sl. No.  ROM/RAM 
Segment Name 
Size in bytes in 
GHS 
1. 
ROM 
DEFAULT_CODE_ROM 
11394 
CONST_ROM_UNSPECIFIED 
316 
CONST_ROM_32BIT 
48 
 
2. 
RAM 
  RAM_1BIT 
        1 
 
  RAM_8BIT 
          1 
RAM_16BIT 
         4 
RAM_32BIT 
        4 
 RAM_UNSPECIFIED 
         24 
 
 
The details of memory usage for the typical configuration, with DET enabled 
are provided in this section. 
 
 
 Table 13-3 ROM/RAM Details with DET 
 
 
 
 
Sl. No.  ROM/RAM 
Segment Name 
Size in bytes in 
GHS 
1. 
ROM 
DEFAULT_CODE_ROM 
9790 
CONST_ROM_UNSPECIFIED  
316 
CONST_ROM_32BIT 
48 
 
2. 
RAM 
RAM_1BIT  

 RAM_8BIT  

RAM_16BIT 

RAM_32BIT 

 RAM_UNSPECIFIED 
24 
 
 
13.3.2. 
Stack Depth 
 
The worst-case stack depth for MCU Driver Component for the typical 
configuration is 148 bytes. 
 
13.3.3. 
Throughput Details 
 
The throughput details of the APIs at 160 MHz clock frequency are mentioned 
below. 
 
 
            
 
 

  62 
 

     P1x-C Specific Information  
 
 
 
 
                             Chapter 13  
 
 

    Table 13-4  
Throughput Details of the APIs 
 
 
 
Throughput in 
 
Sl. No. 
API Name 
microseconds in  Remarks 
GHS 
1. 
Mcu_Init 
84.425 

2. 
Mcu_InitRamSection 
14.125 

3. 
Mcu_InitClock 
117.562 

4. 
Mcu_DistributePllClock 
0.87 

5. 
Mcu_GetPllStatus 
0.87 

6. 
Mcu_GetResetReason 
0.100 

7. 
Mcu_GetResetRawValue 
0.87 

8. 
Mcu_GetVersionInfo 
0.137 

9. 
Mcu_GetRamstate 
0.662 

10. 
Mcu_PerformReset 
0. 150 

11. 
Mcu_EcmReleaseErrorOutPin 
8.900 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63 

  Chapter 13                                                                                                  P1x-C Specific Information 
 
 
 
 
  64 
 

 
   Release Details 

 
 
 
 
 
 
 
                Chapter 14  
 
Chapter 14  Release Details 
 
                                         MCU Driver Software 
 
Version: 1.1.0 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65 

    
Chapter 14  

 
 
 
 
 
 
 
 
        Release Details 
 
 
 
 
 
 
 
 
 
 
 
66 
 

 
 
Revision History 
 
 
Sl. No.  Description 
Version 
Date 
1. 
Initial Version 
1.0.0 
14-Aug-2015 
2.  
Following changes are made  
1.0.1 
15-Apr-2016 
1. Chapter 2 “Reference Documents” is updated. 
  2. Chapter 3 and Chapter 9 is updated for the name of the Tool User 
    Manual. 
  3. Chapter 4 “Forethoughts” is updated.  
  4. Section 4.3 is updated for adding the information on Critical    
    Section Protection. 
 5. Chapter 5 is updated for the information on GTM and the HW  
     BIST. 
 6. Section 10.3 “Function Definitions” are updated. 
 7. Chapter 6 “Register Details” is updated. 
 8. Section 13.2 “ISR Function” is added. 
 9. Section 13.4 “Memory and Throughput” is updated. 
10. Chapter 14 “Release Details” is updated. 
 11. Added R number for the document. 
 
3. 
Following changes are made 
1.0.2 
27-Jan-2017 
1.  Removed Section 13.1 “Compiler Linker and Assembler”. 
2.  Updated Section 4.4 to add note on User Mode.  
3.  Chapter 6 “Register Details” is updated. 
4.  Added critical section details table in section 4.3 
5.  Chapter 14 “Release Details” is updated. 
6.  Chapter  8  is  updated  for  Stub  C  Header  files  and  added  the 
description of the stub files in Table 8-1. 
7.  Updated the Table 4-1 Supervisor Mode and User Mode Details. 
8.  Updated Table 6-1 and Table 11-2  
9.  Section 4.6 register write verify has added. 
10.  Chapter 5 Architecture Details is updated. 
11.  Section 7.1 Services Provided by MCU driver component to user 
is updated. 
12.  Section MCU driver generation tool has updated with Mcu_Cbk.h 
header file in chapter 8. 
13.  Section 13.2.1 is updated with 701371 series. 
14.  Device  name  R7F701370A,  R7F701371  and  R7F701372, 
updated in chapter13. 
15.  Section  4.1  updated  with  forethought  on  ‘McuLoopCount’ 
parameter. 
16.  Os.c  and  SchM_Mcu.c  are  added  in  the  stub  files  and  their 
descriptions are included in Table 8-1 
17.  Updated Table 4-1 Supervisor Mode and User Mode Details. 
18.  Section 13.2.2 is updated with other device options. 
19.  Section  4.1  updated  with  general  thought  regarding  CLMA4 
support. 
 
 
 
 
 
 
67 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AUTOSAR MCAL R4.0.3 User's Manual 
MCU Driver Component Ver.1.0.2 
Embedded User’s Manual 
 
Publication Date: Rev.1.00, January 27, 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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                                                                                                                                           
     R20UT3651EJ0100 
 
 
 

Document Outline


6 - R20UT3652EJ0100-AUTOSAR

AUTOSAR MCAL R4.0.3 User's Manual

8 - R20UT3652EJ0100-AUTOSARs




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AUTOSAR MCAL R4.0.3 
User’s Manual 
 
 
 
 
 
MCU Driver Component Ver.1.0.2 
 
 
 
 
  Generation Tool User’s Manual 
 
 
 
Target Device: 
RH850/P1x-C
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.00 Jan 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 
 ARXML 
Autosar eXtensible Mark-up Language 
BSWMDT 
Basic Software Module Description Template 
CFD 
Control Flow Diagram 
DFD 
Data Flow Diagram 
DEM 
Diagnostic Event Manager 
ECM 
Error Control Module 
ECU 
Electronic Control Unit 
Id 
Identifier 
MCAL 
Micro Controller Abstraction Layer 
MCU 
Micro Controller Unit 
SPAL 
Standard Peripheral Abstraction Layer 
XML 
eXtensible Mark-up Language 
 
 
 
 
Definitions 
 
 
 
Terminology 
Description 
BSWMDT File 
This file is the template for the Basic Software Module Description. 
Configuration XML File 
This file contains the setting of command line options. 
ECU Configuration Description 
Input file to MCU Driver MCAL Code Generator Tool. It is 
File 
generated by ECU Configuration Editor. 
Sl.No 
Serial Number. 
 
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 
Code Generation Overview .......................................................... 13 
Chapter 4 
Input Files ..................................................................................... 15 
Chapter 5 
Output Files .................................................................................. 17 
Chapter 6 
Precautions ................................................................................... 19 
Chapter 7 
User Configuration Validation ..................................................... 21 
Chapter 8 Configuration Overview .................................................................... 23 
8.1 
Container Overview ......................................................................................................... 23 
8.1.1 
Pre Compile Time Configurable Parameters ....................................................... 24 
8.1.2 
Post Build Time Configurable Parameters ........................................................... 30 
Chapter 9 
Messages ...................................................................................... 53 
9.1 
Error Messages ................................................................................................................ 53 
9.2 
Warning Messages .......................................................................................................... 61 
9.3 
Information Messages .................................................................................................... 61 
 
 
 
 
 
7 

 
List of Figures 
 
Figure 3-1 
Overview of Code Generation ............................................................................................. 13 
Figure 3-2       Flow-Diagram of Code Generation ...................................................................................... 14 
Figure 8-1 
Configuration overview ........................................................................................................ 23 
 
 
List of Tables 
 

Table 5-1 
Output Files Description ........................................................................................................... 17 
Table 8-1 
 Pre Compile Time Configurable Parameters .......................................................................... 24 
Table 8-2 
 Post Build Time Configurable Parameters .............................................................................. 30 
 
 

 
 
 
  8 

Introduction 
Chapter 1 
 
Chapter 1  Introduction 
 
 
The MCU Driver component provides services for basic microcontroller 
initialization, reset, standby modes, handles ECM and microcontroller 
specific functions required from other SPAL components. 
 
 
The MCU Driver Component comprises of two sections i.e., Embedded 
Software and MCAL Code Generator Tool to achieve scalability and 
configurability. 
 
 
The document describes the MCU module specific inputs and outputs of the 
MCAL Code Generator Tool that is the common code generator engine used 
for the generation of the configuration code for all MCAL modules. MCAL 
Code Generator Tool is a command line tool that extracts information from 
ECU Configuration Description File, BSWMDT File and generates MCU 
Driver Configuration source and header files (Mcu_PBcfg.c,  
Mcu_Hardware.c, Mcu_Hardware.h, Mcu_Cbk.h and Mcu_Cfg.h). 
 
This document contains information on the options, input and output files of 
the MCAL Code Generator Tool. In addition, this manual covers a step-by-
step procedure for the usage of MCAL Code Generator Tool. 
 
 
 
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 (Code Generation 
Provides the overview of Code generation. 
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 MCAL Code 
Generator 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 MCAL Code 
Validation) 
Generator Tool 
Section 8 (Configuration 
Describes the overview of the configuration parameters. 
overview) 
Section 9 (Messages) 
Describes all the Error/Warning/Information messages of R4.0.3 which 
helps the user to understand the probable reason for the same. 
 
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_SWS_MCUDriver 
3.2.0 
2. 
MCAL_CodeGenerator_Tool_UserManual.pdf 
1.7 
3. 
R20UT3828EJ0100-AUTOSAR.pdf 
1.0.2 
 
 
 
2.2. 
Trademark Notice 
 
 
Microsoft and Windows are trademarks/registered trademarks of Microsoft 
Corporation. 
 
11 

Chapter 2                                                                                                                                  Reference 
 
 
 
12 






 Code Generation Overview 
Chapter 3 
 
 
Chapter 3  Code Generation Overview 
 
 
Overview of Code Generation is shown below 
 
                
                                                                            
ECU Configuration 
 
Description File and 

 
 
BSWMDT File 
 
Mcu_Cfg.h, 
 
MCAL Generator 
Mcu_Hardware.h, 
 
 
Mcu_PBcfg.c, 
 
Velocity template 
Mcu_Hardware.c,
 
files for MCU 
Mcu_Cbk.h 
 
 
 
Configuration XML 
 
 
File 
 
Figure 3-1  Overview of Code Generation 
 
 
  ECU Configuration Description File (.arxml): 
This file will contain MCU Driver specific configuration information. 
This file should be generated by AUTOSAR specified Configuration 
Editor. 
 
  BSWMDT File (.arxml): 
MCAL Code Generator 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. 
 
  Velocity template files: 
Mcu_PBcfg_c.vm, Mcu_Cfg_h.vm, Mcu_Hardware_h.vm, 
Mcu_Hardware_c.vm, Mcu_Validate.vm, Mcu_Cbk_h.vm and 
CommonHelper.vm 
They are interpreted by the MCAL Code Generator Tool in order to 
provide user input validation and generate the final output file 
needed by the AUTOSAR configuration chain.They are the "logic" of 
the Code Generator. 
 
  Configuration XML File (.xml): 
This file is used to specify which velocity template to use and their 
location and the name of the output file generated. 
 
For the error free input file, the MCAL Code Generator Tool generates the 
following output files: Mcu_Cfg.h, Mcu_Hardware.h, Mcu_PBcfg.c, Mcu_Cbk.h 
and Mcu_Hardware.c and displays appropriate context sensitive error 
messages for wrong input and exits. 
 
ECU Configuration Description File can be created or edited using ECU 
Configuration Editor. 
 
 
13 

Chapter 3                                                                                                  Code Generation Overview
 

 
 
 
Concept of execution for MCU Driver MCAL Code 
Generator Tool is as follows: 
 
 
Generation start 
 
Validate.vm 
Common 
Helper.vm 
 
 
 
 
config.xml 
 
 
 
ECU Configuration 
 
Description Files 
Template files(.vm) 
MCAL Code Generator 
 
And BSWMDT file 
Tool 
 
 
(.arxml) 
 
 
 
 
 
No 
Validation 
Yes 
 
successful 
 
 
 
Display Error 
Generate Output Files 
 
 
 
 
 
 
 
 
    Generation stop 
 
Figure 3-2       Flow-Diagram of Code Generation 
 

The module “Validate” will validate the configuration (contents of 
ECU Configuration Description File(s) as input). If there are 
incorrect values or incorrect dependencies, the MCAL Code 
Generator Tool will display error, warning and information 
messages. In case of errors, the MCAL Code Generator Tool will 
abort the execution.  
Mcu_Cfg_h.vm / Mcu_PBcfg_c.vm will generate compiler switch / 
structures necessary to the AUTOSAR Configuration chain and 
vendor specific parameters. 
Mcu_Hardware_h.vm / Mcu_Hardware_c.vm will generate hardware 
related info (defines number of actual instances / channels used / 
structure to access to the I/O mapped peripheral). 
 
Remark 
Please consult the general MCAL Code Generator Tool User Manual 
(MCAL_CodeGenerator_Tool_UserManual.pdf) and 
GettingStarted_MCAL_Drivers_X1x (R20UT3828EJ0100-AUTOSAR.pdf) for 
details about the MCAL Code Generator Tool command line options.
14 
 

Input Files 
Chapter 4 
 
 
Chapter 4  Input Files 

 
 
MCAL Code Generator Tool will accept the config.xml file which has paths 
to the Velocity template files for generating Mcu Driver files. MCAL Code 
Generator Tool need ECU Configuration Description File(s) and BSWMDT 
File as inputs to generate Mcu Driver specific source files. Hence ECU 
Configuration Description File should contain configuration of MCU Driver 
module. MCAL Code Generator 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. 
 
15 

Chapter 4                                                                                                                                Input Files 
 
 
 
16 

Output Files 
Chapter 5 
 
 
Chapter 5  Output Files 
 
 
MCAL Code Generator Tool generates configuration details in C Header and 
C Source files Mcu_Cfg.h, Mcu_Hardware.c, Mcu_Hardware.h, Mcu_PBcfg.c 
and Mcu_Cbk.h. 
 
 
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_Hardware.c  This file contains the definitions for addresses of the hardware registers used in the 
MCU Driver Module. 
Mcu_Hardware.h  This file contains the declarations for addresses of the hardware registers used in the 
MCU Driver Module. 
Mcu_PBcfg.c 
This file contains post-build configuration data. 
Mcu_Cbk.h 
This file contains call back function of Dem. 
 
Remark  Output files generated by MCAL Code Generator 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 module. 
 
•  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. 
 
•  MCU Configuration is dependent on DEM module description file. 
•  Configuration xml file :config.xml should convey the velocity template file 
location and output file location. 
•  Configuration XML File should contain the file extension ‘.xml’. 
 
•  If the output files generated by MCAL Code Generator 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 MCAL 
Code Generator Tool. Otherwise MCAL Code Generator Tool may not 
produce the expected results or may lead to errors/warnings/information 
messages. 
 
 
Remarks
Please refer MCU Component User Manual (R20UT3651EJ0100-
AUTOSAR.pdf) for deviations from AUTOSAR specifications. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 MCAL code 
generator 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 9 “Messages”. 
 
 
The MCAL Code Generator 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. 
 
 
<message_type>_<vendor_id>_<module_id>_<message_id>:<message_cont
ent>.  
where, 
  <message_type>     : ERR/WARNING/INFO 
 
  < vendor_id >           : vendor Id = 59 
 
 
  < module_id >          : 101- MCU Driver Module id (101) for user   
                                   configuration checks. 
    
  < Message_id.>       :  001-999  
 
  <message_content>:   Message content provides information   
                                    about error or warning or information displayed          
                                    when the user has configured incorrect inputs. 
 
                                                               File Name’ and ‘Path’ need not be present for all      
                                                                                        Error/Warning/Information messages 
                   
                                    File Name: Name of the file in which the error has 
                                    occurred. 
 
                                    Path: Absolute path of the container in which the  
                                    parameter is present 
 
 
 
 
21 

Chapter 7                                                                                                User Configuration Validation 
 
 
22 
 































Configuration Overview 
Chapter 8 
 
 
 
 
Chapter 8 Configuration Overview 
 
8.1 
Container Overview 
 
                                                                                 MCU 
 
 
McuPublishedInformation 
McuGeneralConfiguration 
McuModuleConfiguration 
 
 
McuEcmErrorSourcesCfg 
McuInternalOscillatorClk 
McuClockSettingConfig 
 
McuDemEventParameterRefs 
McuExternalClkOutSetting 
McuGTMClockSettingsConfig 
 
 
 
McuModeSettingConf 
McuPLLClkSetting 
McuGTMClockSettings 
 
McuWakeUpFactorDetails 
McuWdtaCounterClk 
 
McuRamSectorSettingConf 
 
McuSAWdtCounterClk 
 
McuClockReferencePoint 
 
 
 
 
Figure 8-1 
Configuration overview 
23 

Chapter 8                                                                                                       Configuration Overview 
 
8.1.1 
 Pre Compile Time Configurable Parameters 
Table 8-1 
 Pre Compile Time Configurable Parameters 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
McuGener
McuVersionCheckExtern
Boolean 
TRUE / FALSE 
Enable / disable 
al 
alModules 
AUTOSAR Version 
check for inter-
 
module 
dependencies 
McuDevErrorDetect 
Boolean 
TRUE / FALSE 
Pre-processor 
switch for enabling 
the development 
error detection and 
reporting 
McuGetRamStateApi 
Boolean 
TRUE / FALSE 
Pre-processor 
switch to 
enable/disable the 
API 
Mcu_GetRamState
. 
McuInitClock 
Boolean 
TRUE / FALSE 
Pre-processor 
switch to 
enable/disable the 
API Mcu_InitClock 
to initialize the 
clock settings. 
McuNoPll 
Boolean 
TRUE / FALSE 
This parameter 
shall be set true, if 
the H/W does not 
have a PLL or the 
PLL circuitry is 
enabled after the 
power on without 
S/W intervention. 
In this case 
MCU_DistributePll
Clock has to be 
disabled and 
MCU_GetPllStatus 
has to return 
MCU_PLL_STATU
S_UNDEFINED. 
Otherwise this 
parameters has to 
be set False. 
McuPerformResetApi 
Boolean 
TRUE / FALSE 
Pre-processor 
switch to enable or 
disable the API to 
read out the 
modules version 
information 
McuVersionInfoApi 
Boolean 
TRUE / FALSE 
Pre-processor 
switch to enable or 
disable the API to 
read out the 
24 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
modules version 
information 
McuCriticalSectionProtect
Boolean 
TRUE / FALSE 
This parameter 
ion 
specifies if the 
MCU driver CPU 
load can be 
reduced by 
disabling the 
enter/exit critical 
section 
functionality by 
adding a 
precompiled 
configuration 
parameter to the 
MCU driver 
configuration. 
McuSwResetCallApi 
Boolean 
TRUE / FALSE 
This parameter 
shall decide if 
MCU_RESET_CAL
LOUT API will be 
used for to reset 
software 
McuEcmDelayTimerOverf
Integer 
0-65535 
This parameter 
lowValue 
specifies to 
configure the 
overflow value for 
the ECM delay 
timer 
McuEcmErrorOutputMod
Enum 
NON_DYNAMIC_MO
This parameter 

DE 
used to configure 
the error output 
DYNAMIC_MODE 
either in Dynamic 
or Non-Dynamic 
mode 
McuClm0Operation 
Boolean 
TRUE / FALSE 
This parameter 
enables or disables 
operation of clock 
monitor function for 
CLMA0 
McuClm1Operation 
Boolean 
TRUE / FALSE 
This parameter 
enables or disables 
operation of clock 
monitor function for 
CLMA1 
McuClm2Operation 
Boolean 
TRUE / FALSE 
This parameter 
enables or disables 
operation of clock 
monitor function for 
CLMA2 
McuClm3Operation 
Boolean 
TRUE / FALSE 
This parameter 
enables or disables 
operation of clock 
monitor function for 
CLMA3 
25 

Chapter 8                                                                                                       Configuration Overview 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
McuClm4Operation 
Boolean 
TRUE / FALSE 
This parameter 
enables or disables 
operation of clock 
monitor function for 
CLMA4 
McuClm0MonitoringClock
Float 
0-20 
This parameter 
Accuracy 
specifies the 
monitoring clock 
accuracy of 
CLMA0 in 
percentage. 
McuClm1MonitoringClock
Float 
1-20 
This parameter 
Accuracy 
specifies the 
monitoring clock 
accuracy of 
CLMA1 in 
percentage. 
McuClm2MonitoringClock
Float 
2-20 
This parameter 
Accuracy 
specifies the 
monitoring clock 
accuracy of 
CLMA2 in 
percentage. 
McuClm3MonitoringClock
Float 
0-20 
This parameter 
Accuracy 
specifies the 
monitoring clock 
accuracy of 
CLMA3 in 
percentage. 
McuClm4MonitoringClock
Float 
0-20 
This parameter 
Accuracy 
specifies the 
monitoring clock 
accuracy of 
CLMA4 in 
percentage. 
McuClm0SamplingClock
Float 
6-26 
This parameter 
Accuracy 
specifies the 
sampling clock 
accuracy of 
CLMA0 in 
percentage 
McuClm1SamplingClock
Float 
3-20 
This parameter 
Accuracy 
specifies the 
sampling clock 
accuracy of 
CLMA1 in 
percentage 
McuClm2SamplingClock
Float 
5-20 
This parameter 
Accuracy 
specifies the 
sampling clock 
accuracy of 
CLMA2 in 
percentage 
McuClm3SamplingClock
Float 
2-20 
This parameter 
Accuracy 
specifies the 
sampling clock 
26 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
accuracy of 
CLMA3 in 
percentage 
McuClm4SamplingClock
Float 
2-20 
This parameter 
Accuracy 
specifies the 
sampling clock 
accuracy of 
CLMA4 in 
percentage 
McuLoopCount 
Integer 
1-255 
The count value for 
the feed-back loop 
in Mcu module. 
McuEcmRstConfigure 
Enum 
SYSTEM_RESE 
This parameter is 
APPLICATION_RES
used to configure 
ET 
the type of Ecm 
Reset. 
SYSTEM_RESET: 
ECM Module will 
generate System 
Reset. 
APPLICATION_RE
SET: ECM Module 
will generate 
Application Reset.  
 
McuDeviceName 
Enum 
R7F701370A, 
This parameter 
R7F701371, 
contains the 
R7F701372, 
supported device 
R7F701373,  
name. 
R7F701374 
McuGTMConfigurationSu
Boolean 
TRUE / FALSE 
Pre-processor 
pport 
switch to enable or 
disable the 
complete support 
of all GTM related 
functionality. 
McuInterruptConsistency
Boolean 
TRUE / FALSE 
Pre-processor 
Check 
switch to enable or 
disable the 
Interrupt 
Consistency Check 
functionality 
McuUseWriteVerifyErrorI
Boolean 
TRUE / FALSE 
Pre-processor 
nterface 
switch to enable or 
disable the user 
can configure error 
notification 
interface instead of 
DEM error for 
Write-Verify 
functionality. 
McuWriteVerifyErrorInterf
function 
Null/WriteVerify 
Pre-processor 
ace 
switch to enable or 
disable the 
parameter is used 
to configure the 
name of the error 
27 

Chapter 8                                                                                                       Configuration Overview 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
notification which 
shall be called with 
the ApiID and 
ErrorId when there 
is a Write Verify 
error. 
McuWriteVerify 
Enum 
WV_DISABLE 
This parameter 
enables selection 
WV_INIT_ONLY 
and support of 
WV_INIT_RUNTIME 
WV_INIT_ONLY or 
WV_INIT_RUNTIM
E register write-
verify functionality 
of registers. 
McuClma0SelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable the user 
can configure 
CLMA0 Self 
Diagnosis Support. 
McuClma1SelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable the user 
can configure 
CLMA1Self 
DiagnosisSupport. 
McuClma2SelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable the user 
can configure 
CLMA2 Self 
DiagnosisSupport. 
McuClma3SelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable the user 
can configure 
CLMA3 Self 
DiagnosisSupport. 
McuClma4SelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable the user 
can configure 
CLMA4 Self 
DiagnosisSupport. 
McuCvmSelfDiagnosticTe
Boolean 
TRUE / FALSE 
Pre-processor 
st 
switch to enable or 
disable the user 
can configure CVM 
Self Diagnosis 
Support 
28 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container  Parameter Name 
Param
Parameter  Range 
Parameter 
Name 
eter 
Description  
Type 
 
McuEcmSelfDiagnosticTest 
Boolean 
TRUE / FALSE 
Pre-processor 
switch to enable or 
disable the user 
can configure ECM 
Self Diagnosis 
Support 
McuLockStepSelfDiagnostic
Boolean 
TRUE / FALSE 
Pre-processor 
Test 
switch to enable or 
disable Lockstep 
Self Diagnosis 
Support 
 
 
29 

Chapter 8                                                                                                       Configuration Overview 
 
8.1.2 
Post Build Time Configurable Parameters 
Table 8-2 
 Post Build Time Configurable Parameters 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuModul
McuClockSrcFailure
Enum 
DISABLED   
This parameter enables or 
eConfigura
Notification 
ENABLED 
disables clock failure 
tion 
notification. In case this 
feature is not supported by 
HW the setting should be 
disabled. This parameter is 
not used for 
implementation 
McuNumberOfMcuM
Integer 
1-255 
This parameter shall 
odes 
represent the number of 
Modes available for the 
MCU. This parameter is 
not used for 
implementation 
McuRamSectors 
Integer 
1-4294967295 
This parameter shall 
represent the number of 
RAM sectors available for 
the MCU. This parameter 
is not used for 
implementation. 
McuResetSetting 
Integer 
1-255 
This parameter relates to 
the MCU specific reset 
configuration. This applies 
to the function 
Mcu_PerformReset, which 
performs a microcontroller 
reset using the hardware 
feature of the 
microcontroller. This 
parameter is not used for 
implementation 
McuCvmOutMaskFb
Boolean 
TRUE / FALSE 
This parameter enables or 
ist 
disables the CVMOUT 
Output Mask for FBIST 
Operation 
McuCvmOutMaskDi
Boolean 
TRUE / FALSE 
This parameter enables or 
ag 
disables the CVMOUT 
Output Mask for DIAG 
Operation 
McuCvmOutputFilter 
Boolean 
TRUE / FALSE 
This parameter enables or 
disables the CVMOUT 
Output Filter Control 
McuCvmDiagLockBit  Boolean 
TRUE / FALSE 
This parameter lock or 
unlock the CVM Diagnosis 
during normal operation. 
McuCvmResetEnabl
Boolean 
TRUE / FALSE 
This parameter enable or 

disable a reset of core 
voltage operation area 
upon detection of abnormal 
in core power supply. 
30 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuSwResetTrigger 
Enum 
SW_SYSTEM_RESE
This parameter will decide 

the type of software reset. 
SW_APPLICATION_
RESET  NO_RESET 
McuCloc
McuClockSettingId 
Integer 
0-255 
The Id of this 
kSetting
McuClockSettingConfig to 
Config 
be used as argument for 
the API call 
"Mcu_InitClock".It should 
be unique and consecutive 
over multiple ClockSetting 
configurations. 
McuMainOsciFreque
Enum 
FREQ_16000000 
This parameter selects the 
ncy 
main oscillator frequency in 
FREQ_20000000 
Hz 
FREQ_24000000 
McuCpuMainSysClk 
Integer 
120000000- 
This parameter contains 
240000000 
the CPU main system 
clock frequency. This 
parameter does not affect 
the behaviour of the MCU 
driver. It is a frequency that 
will be available to other 
modules for reference. It 
either needs to be 
calculated manually or by 
the configuration editor 
McuUnitName 
Enum 
CLK_CPUM 
This parameter contains 
the functional unit name for 
the CPU. 
McuInter
McuPeripheralClock 
Integer 
16000000 
This parameter contains 
nalOscill
the Internal Oscillator 
atorClk 
Clock value. 
McuExte
McuExternalClk0So
Enum 
MCU_MAIN_OSCILL
This parameter is to select 
rnalClkO
urceSel 
ATOR  
the external clock 0 source. 
utSetting 
MCU_MAIN_OSCILLATO
MCU_CLK_LSB 
R: 16 to 24 MHz MainOSC. 
MCU_CLK_CPU 
MCU_CLK_LSB (Low 
Speed System Clock): 30 
MCU_BACKUP_CLO
to 40 MHz 
CK       
MCU_CLK_CPU: 120 to 
240 MHz clock. 
MCU_BACKUP_CLOCK: 8 
MHz. 
McuExternalClk1So
Enum 
MCU_MAIN_OSCILL
This parameter is to select 
urceSel 
ATOR  
the external clock 1 source.  
MCU_MAIN_OSCILLATOR
MCU_CLK_LSB 
: 16 to 24 MHz MainOSC. 
MCU_CLK_CPU 
MCU_CLK_LSB: Low 
Speed System Clock. 
MCU_BACKUP_CLO
If MCU_CLK_CPU is 240 
CK       
MHz or 160 MHz, 
MCU_CLK_LSB is 40 
MHz. 
31 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

If MCU_CLK_CPU is 120 
MHz, MCU_CLK_LSB is 
30 MHz 
MCU_CLK_CPU: 120 to 
240 MHz clock. 
MCU_BACKUP_CLOCK: 
Internal oscillator clock * 
1/2. 
 
McuExternalClk0Divi
Integer 
1-1023 
This parameter is to select 
derSel 
the divider for external 
clock 0 source 
McuExternalClk1Divi
Integer 
1-1023 
This parameter is to select 
derSel 
the divider for external 
clock 1 source 
McuExternalClock0 
Integer 
250000- 20000000 
This parameter contains 
the output of External 
Clock 0 value. 
McuExternalClock1 
Integer 
250000- 20000000 
This parameter contains 
the output of External 
Clock 1 value. 
McuPLL
McuSystemSourceS
Enum 
MCU_PLL  
This parameter is to select 
ClkSettin
el 
MCU_INTERNAL_OS
the System Clock source 0.  

CILLATOR 
MCU_PLL: 320 to 480 
MHz Clock. 
MCU_INTERNAL_OSCILL
ATOR: 16 MHz IntOSC. 
McuPLLClk0Divider
Integer 
1-7 
This parameter is to select 
Sel 
the divider for PLL0 
source. 
McuPLLClk1Divider
Integer 
1-7 
This parameter is to select 
Sel 
the divider for PLL1 
source. 
McuPLLClock0 
Integer 
320000000- 
This parameter contains 
480000000 
the PLL0 Clock value. 
McuOPBT1Sel 
Integer 
0-4294967295 
This parameter contains 
the  value that is to be 
written in OPBT1. 
McuSA
McuSAWdtCounterD
Enum 
DIVBY_ID_8  
This parameter contains 
WdtCou
ivider 
DIVBY_ID_9 
the divider for the Secure 
nterClk 
Application WDTA counter 
clock  DIVBY_ID_8: 
Secure Application 
WdtacounterClk/80000  
(or) WdtacounterClk/250 is 
selected as clock 
divider.Provided 
SAWDTMD=0/1.  
DIVBY_ID_9: Secure 
Application 
WdtacounterClk/80000  
(or) WdtacounterClk/250 is 
selected as clock 
divider.Provided 
SAWDTMD=1/0. 
32 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuUnitName 
Enum 
WDTCLKI 
This parameter contains 
the functional unit name for 
the Secure Application 
Wdta counter Clock. 
McuPeripheralClock 
Integer 
2000- 640000 
This parameter contains 
the Wdta counter Clock. 
McuWdt
McuWdtCounterDivi
Enum 
DIVBY_1_ID_1  
This parameter contains 
aCounte
der 
DIVBY_32_ID_1 
the divider for the WDTA 
rClk 
counter clock  
DIVBY_1_ID_1: 
WdtacounterClk/1 is 
selected as clock divider.  
DIVBY_32_ID_1: 
WdtacounterClk/32 is 
selected as clock divider 
McuUnitName 
Enum 
WDTCLKI 
This parameter contains 
the functional unit name for 
the Wdta counter Clock. 
McuPeripheralClock 
Integer 
250000- 8000000 
This parameter contains 
the Wdta counter Clock. 
McuCloc
McuClockReference
Float 
0- 4294967295 
This is the frequency for 
kReferen
PointFrequency 
the specific instance of the 
cePoint 
McuClockReferencePoint 
container. It shall be given 
in Hz. This parameter is 
not used for 
implementation. So if it is 
used for reference 
frequency then user has to 
take care for configuration 
of valid clock domain 
associated with it 
McuGT
McuGTMClockSelec
Enum 
CMU_CLK0 
This parameter used to 
MClockS
tion 
CMU_CLK1 
configure the CMU clocks. 
ettings 
CMU_CLK2 
CMU_CLK0: CMU clock 0. 
CMU_CLK3 
CMU_CLK1: CMU clock 1. 
CMU_CLK4 
CMU_CLK2: CMU clock 2. 
CMU_CLK5 
CMU_CLK3: CMU clock 3. 
CMU_CLK6 
CMU_CLK4: CMU clock 4. 
CMU_CLK7 
CMU_CLK5: CMU clock 5. 
CMU_CLK6: CMU clock 6. 
CMU_CLK7: CMU clock 7. 
McuGTMChannelClk
Integer 
1-16777215 
This parameter holds the 
SrcDivider 
Channel Clock Source 
Divider. 
McuGT
McuGTMCMUGCLK
Integer 
1-16777215 
This parameter holds the 
MClockS
Numerator 
Numerator for the CMU 
ettingsC
Global Clock Divider. 
onfig 
McuGTMCMUGCLK
Integer 
1-16777215 
This parameter holds the 
Denominator 
Denominator for the CMU 
Global Clock Divider. 
33 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuEcm
McuEcmErrorMaska
Boolean  
TRUE / FALSE 
This parameter enables or 
ErrorSou
bleInterrupt 
disables generation of a 
rcesCfg0 
maskable interrupt when 
to 
the error occurs from each 
McuEcm
source 
ErrorSou
McuEcmErrorNonM
Boolean 
TRUE / FALSE 
This parameter enables or 
rcesCfg9
askableInterrupt 
disables generation of a 

non maskable interrupt 
when the error occurs from 
each error source 
McuEcmErrorInterna
Boolean 
TRUE / FALSE 
This parameter enables or 
lReset 
disables generation of an 
internal reset when the 
error occurs from each 
error source 
McuEcmErrorNMIDe
Boolean 
TRUE / FALSE 
This parameter enables or 
layTimer 
disables delay timer start 
caused by non-maskable 
interrupts in response to 
errors from each error 
source 
McuEcmErrorMIDela
Boolean 
TRUE / FALSE 
This parameter enables or 
yTimer 
disables delay timer start 
caused by maskable 
interrupts in response to 
errors from each error 
source 
McuEcmErrorOutput
Boolean 
TRUE / FALSE 
This parameter mask or 
Mask 
unmask the individual error 
sources of the error pin 
output from each error 
source 
McuMiNotification 
Function 
NA 
This parameter contains 
notification function for MI 
notification 
McuNmiNotification 
Function 
NA 
This parameter contains 
notification function for NMI 
notification. 
McuEcmInitialNotific
function 
NA 
This parameter is used for 
ation 
notify the upper layer,if any 
ECM error has been 
already detected at system 
start-up. 
 
McuEcmErrorInterna
Boolean 
TRUE / FALSE 
This parameter enables or 
disables generation of an 
 
lReset 
internal reset when the 
McuEcm
ecm delay timer overflow 
ErrorSou
error occurs. 
rcesCfg9
McuEcmErrorOutput
Boolean 
TRUE / FALSE 
This parameter mask or 

Mask 
unmask the individual error 
sources of the error pin 
output when the ecm delay 
timer overflow error occurs. 
McuEcmInitialNotific
function 
NA 
This parameter is used for 
ation 
notify the upper layer,if any 
ECM error has been 
34 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

already detected at system 
start-up. 
McuDem
MCU_E_CLOCK_F
Referenc
Reference to 
Reference to configured 
EventPa
AILURE 

DemEventId of Dem 
DEM event to report "Clock 
rameter
module. 
source failure". 
Refs 
MCU_E_WRITE_TI
Referenc
Reference to 
Reference to configured 
MEOUT_FAILURE 

DemEventId of Dem 
DEM event to report "write 
module. 
failure". 
MCU_E_POWERD
Referenc
Reference to 
Reference to configured 
OWN_MODE_FAIL

DemEventId of Dem 
DEM event to report 
URE 
module. 
"Power Down Mode 
failure". 
MCU_E_INT_INCO
Referenc
Reference to 
Reference to the 
NSISTENT 

DemEventId of Dem 
DemEventParameter which 
module. 
shall be issued when 
interrupt inconsistency is 
detected. 
MCU_E_REG_WRI
Referenc
Reference to 
Reference to the 
TE_VERIFY 

DemEventId of Dem 
DemEventParameter which 
module. 
shall be issued when a 
register write-verify failure 
was detected. If the 
reference is not configured 
the error shall not be 
reported. 
MCU_E_CLM_SELF
Referenc
Reference to 
Reference to the 
DIAG_FAILURE 

DemEventId of Dem 
configured DEM event to 
module. 
report “CLM self diagnostic 
failure” 
MCU_E_ECM_SEL
Referenc
Reference to 
Reference to the 
FDIAG_FAILURE 

DemEventId of Dem 
configured DEM event to 
module. 
report “ECM self diagnostic 
failure” 
MCU_E_CVM_SEL
Referenc
Reference to 
Reference to the 
FDIAG_FAILURE 

DemEventId of Dem 
configured DEM event to 
module. 
report “CVM self diagnostic 
failure” 
MCU_E_LOCKSTE
Referenc
Reference to 
Reference to the 
P_SELFDIAG_FAIL

DemEventId of Dem 
configured DEM event to 
URE 
module. 
report “LockStep self 
diagnostic failure” 
McuMod
McuMode 
Integer 
1-255 
The parameter represents 
eSetting
the MCU Mode settings. 
Conf 
This parameter is not used 
for implementation. 
McuModeType 
Enum 
MCU_HALT_MODE 
This parameter contains 
the power save mode type 
MCU_MODULE_STA
NDBY_MODE 
McuMcanStopTrigge
Boolean 
TRUE / FALSE 
This parameter will enables 

or disables the stop mode 
triggering of MCAN domain 
35 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuFlexrayStopTrig
Boolean 
TRUE / FALSE 
This parameter will enables 
ger 
or disables the stop mode 
triggering of FLEXRAY 
domain 
McuGtmStopTrigger 
Boolean 
TRUE / FALSE 
This parameter will enables 
or disables the stop mode 
triggering of GTM domain 
McuEthernetStopTri
Boolean 
TRUE / FALSE 
This parameter will enables 
gger 
or disables the stop mode 
triggering of ETHERNET 
domain 
McuRsentStopTrigg
Boolean 
TRUE / FALSE 
This parameter will enables 
er 
or disables the stop mode 
triggering of RSENT 
domain 
McuHsUsrtStopTrigg
Boolean 
TRUE / FALSE 
This parameter will enables 
er 
or disables the stop mode 
triggering of HS_USRT  
domain 
McuCsihStopTrigger 
Boolean 
TRUE / FALSE 
This parameter will enables 
or disables the stop mode 
triggering of CSIH domain 
McuRlin3StopTrigge
Boolean 
TRUE / FALSE 
This parameter will enables 

or disables the stop mode 
triggering of RLIN3 domain 
McuAdcStopTrigger 
Boolean 
TRUE / FALSE 
This parameter will enables 
or disables the stop mode 
triggering of ADC domain 
McuMcanWakeUpTr
Boolean 
TRUE / FALSE 
This parameter will enables 
igger 
or disables the Wakeup 
triggering of MCAN domain 
McuFlexrayWakeup
Boolean 
TRUE / FALSE 
This parameter will enables 
Trigger 
or disables the Wakeup 
triggering of FLEXRAY 
domain 
McuGtmWakeupTrig
Boolean 
TRUE / FALSE 
This parameter will enables 
ger 
or disables the Wakeup 
triggering of GTM domain 
McuEthernetWakeu
Boolean 
TRUE / FALSE 
This parameter will enables 
pTrigger 
or disables the Wakeup 
triggering of ETHERNET 
domain 
McuRsentWakeupTr
Boolean 
TRUE / FALSE 
This parameter will enables 
igger 
or disables the Wakeup 
triggering of RSENT 
domain 
McuHsUsrtWakeupT
Boolean 
TRUE / FALSE 
This parameter will enables 
rigger 
or disables the Wakeup 
triggering of HS_USRT 
domain 
McuCsihWakeupTrig
Boolean 
TRUE / FALSE 
This parameter will enables 
ger 
or disables the Wakeup 
triggering of CSIH domain 
36 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRlin3WakeupTri
Boolean 
TRUE / FALSE 
This parameter will enables 
gger 
or disables the Wakeup 
triggering of RLIN3 domain 
McuAdcWakeupTrig
Boolean 
TRUE / FALSE 
This parameter will enables 
ger 
or disables the Wakeup 
triggering of ADC domain 
McuWak
McuWakeUpFactorN
Enum 
INTECMMI 
This parameter contains 
eUpFact
ame 
wake up factor name for 
INTIPIR0 
orDetails 
PE/Peripherals 
INTIPIR1 
INTICUP 
INTWDTA 
INTSW0 
INTP0 
INTP1 
INTP2 
INTP3 
INTP4 
INTOTS0OTI 
INTOTS0OTULI 
INTSTM00 
INTSTM01 
INTGTM0TIM00 
INTGTM0TIM02 
INTGTM0MCS00 
INTGTM0MCS02 
INTADCF012 
INTCSIH0TIR 
INTCSIH1TIR 
INTRLIN33UR2 
INTP5 
INTP6 
INTP7 
INTP8 
INTP9 
INTGTM0TIM01 
INTGTM0TIM03 
INTMTTCANFE 
INTMCAN0FE 
INTETNA0 
37 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

INTFLX0LINE0 
INTFLX1LINE0 
INTSENT0RI 
INTSENT1RI 
INTDNFA2WUF0 
INTDNFA2WUF1 
INTDNFA3WUF0 
INTDNFA3WUF1 
INTDNFA4WUF0 
INTDNFA4WUF1 
FEINT 
FENMISWDTA 
McuRam
McuRamDefaultValu
Integer 
0-255 
This parameter shall 
SectorS

represent the Data pre-
ettingCo
setting to be initialized 
nf 
McuRamSectionBas
Integer 
4275961856- 
This parameter shall 
eAddress 
4277829631 
represent the MCU RAM 
section base address. For 
LOCAL RAM 128KB 
having range 1 to 131072. 
For VARIABLE RAM 
192KB having range 1 to 
196608. 
For GLOBAL RAM BANK A 
480KB having range 1 to 
491520. 
For GLOBAL RAM BANK B 
480KB having range 1 to 
491520. 
For VARIABLE RAM 
192KB having range 1 to 
196608 
McuRamSectionSize  Integer 
1-65536 
This parameter shall 
represent the MCU RAM 
Section size in bytes. For 
LOCAL RAM 128KB 
having range 1 to 131072. 
For VARIABLE RAM 
192KB having range 1 to 
196608. 
For GLOBAL RAM BANK A 
480KB having range 1 to 
491520. 
For GLOBAL RAM BANK B 
480KB having range 1 to 
491520. 
For VARIABLE RAM 
192KB having range 1 to 
196608. 
38 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuPubl
McuResetReason 
Integer 

The parameter represents 
ishedInfo
the different type of reset 
rmation 
that a Micro supports. This 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module. This parameter is 
not used for 
implementation. 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
PowOnR
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_POWER_ON_RESE

McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
Terminal
that a Micro supports. This 
Rst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_TERMINAL_RESET 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
CvmRst 
that a Micro supports. This 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CVM_RESET 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
SwSysR
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_SW_SYS_RESET 
McuRst
McuResetReason 
Integer 

This container contains the 
RsnConf
configuration for the 
WdtRst 
different type of reset 
reason that can be 
retrieved from 
Mcu_GetResetReason 
API. 
39 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
LockSte
that a Micro supports. This 
pCoreRs
parameter is referenced by 

the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_LOCK_STEP_CORE
_RST 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
PbusFss
that a Micro supports. This 
Rst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_PBUS_FSS_RST 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
BusBridg
that a Micro supports. This 
eErrorRs
parameter is referenced by 

the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_BUS_BRIDGE_ERR
OR_RST 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
SafetyM
that a Micro supports. This 
echCom
parameter is referenced by 
pRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_SAFETY_MECH_C
OMP_RST 
McuRst
McuResetReason 
Integer 

The parameter represents 
RsnConf
the different type of reset 
TempSe
that a Micro supports. This 
nsorRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_TEMPERATURE_S
ENSOR_RST 
McuRst
McuResetReason 
Integer 
10 
The parameter represents 
RsnConf
the different type of reset 
Clma0R
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
40 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

module, 
MCU_CLMA0_RST 
McuRst
McuResetReason 
Integer 
11 
The parameter represents 
RsnConf
the different type of reset 
Clma2R
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CLMA2_RST 
McuRst
McuResetReason 
Integer 
12 
The parameter represents 
RsnConf
the different type of reset 
Clma3R
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CLMA3_RST 
McuRst
McuResetReason 
Integer 
14 
The parameter represents 
RsnConf
the different type of reset 
Clma1R
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CLMA1_RST 
McuRst
McuResetReason 
Integer 
15 
The parameter represents 
RsnConf
the different type of reset 
LRamEc
that a Micro supports. This 
cDedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_LRAM_ECC_DED_
RST 
McuRst
McuResetReason 
Integer 
16 
The parameter represents 
RsnConf
the different type of reset 
GRamEc
that a Micro supports. This 
cDedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_ECC_DED_
RST 
41 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
17 
The parameter represents 
RsnConf
the different type of reset 
CacheR
that a Micro supports. This 
amEdcR
parameter is referenced by 
st 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CACHE_RAM_EDC
_RST 
McuRst
McuResetReason 
Integer 
18 
The parameter represents 
RsnConf
the different type of reset 
CodeFls
that a Micro supports. This 
EccDed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CODE_FLS_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
19 
The parameter represents 
RsnConf
the different type of reset 
DataFls
that a Micro supports. This 
EccDed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DATA_FLS_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
20 
The parameter represents 
RsnConf
the different type of reset 
CsihRa
that a Micro supports. This 
mEccDe
parameter is referenced by 
dRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CSIH_RAM_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
21 
The parameter represents 
RsnConf
the different type of reset 
CanRam
that a Micro supports. This 
EccDed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CAN_RAM_ECC_D
ED_RST 
42 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
22 
The parameter represents 
RsnConf
the different type of reset 
EthRam
that a Micro supports. This 
DedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_ETH_RAM_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
23 
The parameter represents 
RsnConf
the different type of reset 
FrRamE
that a Micro supports. This 
ccDedRs
parameter is referenced by 

the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_FR_RAM_ECC_DE
D_RST 
McuRst
McuResetReason 
Integer 
24 
The parameter represents 
RsnConf
the different type of reset 
GtmRam
that a Micro supports. This 
EccDed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GTM_RAM_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
25 
The parameter represents 
RsnConf
the different type of reset 
BusEcc
that a Micro supports. This 
DedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_BUS_ECC_DED_RS

McuRst
McuResetReason 
Integer 
26 
The parameter represents 
RsnConf
the different type of reset 
BusEccS
that a Micro supports. This 
edRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_BUS_ECC_SED_RS

43 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
27 
The parameter represents 
RsnConf
the different type of reset 
LRamAd
that a Micro supports. This 
drOvfRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_LRAM_ADDR_OVF_
RST 
McuRst
McuResetReason 
Integer 
28 
The parameter represents 
RsnConf
the different type of reset 
GRamA
that a Micro supports. This 
ddrOvfR
parameter is referenced by 
st 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_ADDR_OVF
_RST 
McuRst
McuResetReason 
Integer 
29 
The parameter represents 
RsnConf
the different type of reset 
CodeFls
that a Micro supports. This 
AddrOvf
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CODE_FLS_ADDR_
OVF_RST 
McuRst
McuResetReason 
Integer 
30 
The parameter represents 
RsnConf
the different type of reset 
DataFls
that a Micro supports. This 
AddrOvf
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DATA_FLS_ADDR_
OVF_RST 
McuRst
McuResetReason 
Integer 
31 
The parameter represents 
RsnConf
the different type of reset 
PeriRam
that a Micro supports. This 
EccAddr
parameter is referenced by 
OvfRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_PERI_RAM_ECC_A
DDR_OVF_RST 
44 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
32 
The parameter represents 
RsnConf
the different type of reset 
DtsRam
that a Micro supports. This 
EccDed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DTS_RAM_ECC_D
ED_RST 
McuRst
McuResetReason 
Integer 
33 
The parameter represents 
RsnConf
the different type of reset 
DtsRam
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DTS_RAM_ECC_SE
D_RST 
McuRst
McuResetReason 
Integer 
34 
The parameter represents 
RsnConf
the different type of reset 
LRamEc
that a Micro supports. This 
cSedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_LRAM_ECC_SED_R
ST 
McuRst
McuResetReason 
Integer 
35 
The parameter represents 
RsnConf
the different type of reset 
GRamEc
that a Micro supports. This 
cSedRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_ECC_SED_
RST 
McuRst
McuResetReason 
Integer 
36 
The parameter represents 
RsnConf
the different type of reset 
CodeFls
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CODE_FLS_ECC_S
ED_RST 
45 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
37 
The parameter represents 
RsnConf
the different type of reset 
DataFls
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DATA_FLS_ECC_S
ED_RST 
McuRst
McuResetReason 
Integer 
38 
The parameter represents 
RsnConf
the different type of reset 
CsihRa
that a Micro supports. This 
mEccSe
parameter is referenced by 
dRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CSIH_RAM_ECC_S
ED_RST 
McuRst
McuResetReason 
Integer 
39 
The parameter represents 
RsnConf
the different type of reset 
CanRam
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_CAN_RAM_ECC_S
ED_RST 
McuRst
McuResetReason 
Integer 
40 
The parameter represents 
RsnConf
the different type of reset 
EthRam
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_ETH_RAM_ECC_SE
D_RST 
McuRst
McuResetReason 
Integer 
41 
The parameter represents 
RsnConf
the different type of reset 
FrRamE
that a Micro supports. This 
ccSedRs
parameter is referenced by 

the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_FR_RAM_ECC_SE
D_RST 
46 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
42 
The parameter represents 
RsnConf
the different type of reset 
GtmRam
that a Micro supports. This 
EccSed
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GTM_RAM_ECC_S
ED_RST 
McuRst
McuResetReason 
Integer 
43 
The parameter represents 
RsnConf
the different type of reset 
PEGuar
that a Micro supports. This 
dRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_PE_GUARD_RST 
McuRst
McuResetReason 
Integer 
44 
The parameter represents 
RsnConf
the different type of reset 
GramGu
that a Micro supports. This 
ardRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_GUARD_RS

McuRst
McuResetReason 
Integer 
45 
The parameter represents 
RsnConf
the different type of reset 
MemcGu
that a Micro supports. This 
ardRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_MEMC_GUARD_RS

McuRst
McuResetReason 
Integer 
46 
The parameter represents 
RsnConf
the different type of reset 
SlaveGu
that a Micro supports. This 
ardRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_SLAVE_GUARD_RS

McuRst
McuResetReason 
Integer 
47 
The parameter represents 
RsnConf
the different type of reset 
CodeFls
that a Micro supports. This 
PEUnma
parameter is referenced by 
pAccess
the parameter 
Rst 
EcuMResetReason in the 
ECU State manager 
47 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

module, 
MCU_CODE_FLS_PE_UN
MAP_ACCESS_RST 
McuRst
McuResetReason 
Integer 
48 
The parameter represents 
RsnConf
the different type of reset 
GramPE
that a Micro supports. This 
UnmapA
parameter is referenced by 
ccessRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_PE_UNMAP
_ACCESS_RST 
McuRst
McuResetReason 
Integer 
49 
The parameter represents 
RsnConf
the different type of reset 
LpbPEU
that a Micro supports. This 
nmapAc
parameter is referenced by 
cessRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_LPB_PE_UNMAP_A
CCESS_RST 
McuRst
McuResetReason 
Integer 
50 
The parameter represents 
RsnConf
the different type of reset 
PBusUn
that a Micro supports. This 
mapAcc
parameter is referenced by 
essRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_PBUS_UNMAP_AC
CESS_RST 
McuRst
McuResetReason 
Integer 
51 
The parameter represents 
RsnConf
the different type of reset 
HBusUn
that a Micro supports. This 
mapAcc
parameter is referenced by 
essRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_HBUS_UNMAP_AC
CESS_RST 
McuRst
McuResetReason 
Integer 
52 
The parameter represents 
RsnConf
the different type of reset 
CodeFls
that a Micro supports. This 
GvciUn
parameter is referenced by 
mapAcc
the parameter 
essRst 
EcuMResetReason in the 
ECU State manager 
module, 
48 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

MCU_CODE_FLS_GVCI_
UNMAP_ACCESS_RST 
McuRst
McuResetReason 
Integer 
53 
The parameter represents 
RsnConf
the different type of reset 
GramFls
that a Micro supports. This 
GvciUn
parameter is referenced by 
mapAcc
the parameter 
essRst 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_GRAM_FLS_GVCI_
UNMAP_ACCESS_RST 
McuRst
McuResetReason 
Integer 
54 
The parameter represents 
RsnConf
the different type of reset 
ResHbu
that a Micro supports. This 
sUnmap
parameter is referenced by 
AccessR
the parameter 
st 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_RES_HBUS_UNMA
P_ACCESS_RST 
McuRst
McuResetReason 
Integer 
55 
The parameter represents 
RsnConf
the different type of reset 
DmaTra
that a Micro supports. This 
nsferRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DMA_TRANSFER_
RST 
McuRst
McuResetReason 
Integer 
56 
The parameter represents 
RsnConf
the different type of reset 
DmaUn
that a Micro supports. This 
mapped
parameter is referenced by 
Rst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DMA_UNMAPPED_
RST 
McuRst
McuResetReason 
Integer 
57 
The parameter represents 
RsnConf
the different type of reset 
FlsSequ
that a Micro supports. This 
enceRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
49 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

MCU_FLS_SEQUENCE_R
ST 
McuRst
McuResetReason 
Integer 
58 
The parameter represents 
RsnConf
the different type of reset 
FlsFaciR
that a Micro supports. This 
st 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_FLS_FACI_RST 
McuRst
McuResetReason 
Integer 
59 
The parameter represents 
RsnConf
the different type of reset 
AdcParit
that a Micro supports. This 
yRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_ADC_PARITY_RST 
McuRst
McuResetReason 
Integer 
60 
The parameter represents 
RsnConf
the different type of reset 
PEUnint
that a Micro supports. This 
enEnabl
parameter is referenced by 
eDisable
the parameter 
Rst 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_PE_UNINTEN_EN_
DIS_RST 
McuRst
McuResetReason 
Integer 
61 
The parameter represents 
RsnConf
the different type of reset 
Uninten
that a Micro supports. This 
DeactUs
parameter is referenced by 
erRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_UNINTEN_DEACT_
USR_RST 
McuRst
McuResetReason 
Integer 
62 
The parameter represents 
RsnConf
the different type of reset 
Uninten
that a Micro supports. This 
ActCfpM
parameter is referenced by 
odeRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_UNINTEN_ACT_CF
P_MODE_RST 
50 
 

Configuration Overview 
Chapter 8 
 
 
 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

McuRst
McuResetReason 
Integer 
63 
The parameter represents 
RsnConf
the different type of reset 
Uninten
that a Micro supports. This 
DebugE
parameter is referenced by 
nableDet
the parameter 
ectRst 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_UNINTEN_DEBUG_
EN_DET_RST 
McuRst
McuResetReason 
Integer 
64 
The parameter represents 
RsnConf
the different type of reset 
Uninten
that a Micro supports. This 
ActTest
parameter is referenced by 
ModeRst 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_UNINTEN_ACT_TE
STMODE_RST 
McuRst
McuResetReason 
Integer 
65 
The parameter represents 
RsnConf
the different type of reset 
EcmCo
that a Micro supports. This 
mpRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_ECM_COMP_RST 
McuRst
McuResetReason 
Integer 
66 
The parameter represents 
RsnConf
the different type of reset 
Debugge
that a Micro supports. This 
rRst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_DEBUGGER_RESE

McuRst
McuResetReason 
Integer 
67 
The parameter represents 
RsnConf
the different type of reset 
SwAppl
that a Micro supports. This 
Rst 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_SW_APPL_RESET 
McuRst
McuResetReason 
Integer 
68 
The parameter represents 
RsnConf
the different type of reset 
BistRst 
that a Micro supports. This 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
51 

Chapter 8                                                                                                       Configuration Overview 
 
Container 
Parameter Name 
Param
Parameter Range 
Parameter Description  
Name 
eter 
Type 

module, 
MCU_BIST_RESET 
McuRst
McuResetReason 
Integer 
69 
The parameter represents 
RsnConf
the different type of reset 
RstUnde
that a Micro supports. This 
fined 
parameter is referenced by 
the parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_RESET_UNDEFINE

McuRst
McuResetReason 
Integer 
70 
The parameter represents 
RsnConf
the different type of reset 
RstUnkn
that a Microcontroller 
own 
supports. This parameter is 
referenced by the 
parameter 
EcuMResetReason in the 
ECU State manager 
module, 
MCU_RESET_UNKNOWN 
 
 
 
 
 
 
 
 
 
 
52 
 

 
 
 
 
 
 
       Messages 
Chapter 9 
 
Chapter 9  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 MCAL Code Generator Tool. 
 
 
9.1  Error Messages 
 
ERR_59_101_002:   McuClockSettingConfig container short name between 
configsets should be same for each Clocksetting ID in path 
Mcu/McuModuleConfiguration/McuClockSettingConfig. For ClocksettingId $Id, the 
container short name is different between configset $ConfigSetCount and 
$MaxConfigSets. 
 
This error will occur when McuClockSettingConfig container short name between 
configsets is not same for each Clocksetting ID in path 
Mcu/McuModuleConfiguration/McuClockSettingConfig. 
 
ERR_59_101_003:      McuClockSettingId value in the container path  
Mcu/McuModuleConfiguration/McuClockSettingConfig is out of range in configset 
$ConfigSetCount. It should be configured less than $McuInstance." 
 
This error will occur when McuClockSettingId in the container path 
Mcu/McuModuleConfiguration/McuClockSettingConfig   is out of range in a 
configset   
 
ERR_59_101_004:  McuClockSettingId value = $Id in the container path  
Mcu//McuModuleConfiguration/McuClockSettingConfig  is repeating in configset 
$ConfigSetCount.   
 
This error will occur when McuClockSettingId in the container path 
Mcu/McuModuleConfiguration/McuClockSettingConfig   is repeating in a configset   
    
ERR_59_101_005:    McuClockSettingId value =  $Id  in the container path 
Mcu/McuModuleConfiguration/McuClockSettingConfig   is not configured in 
configset $ConfigSetCount    
 
This error will occur when McuClockSettingId in the container path 
Mcu/McuModuleConfiguration/McuClockSettingConfig   is not configured in a 
configset   
 
 ERR_59_101_006:    Reference path configured for the parameter 
MCU_E_CLOCK_FAILURE is not correct in the path 
<Mcu/McuModuleConfiguration/McuDemEventPrameterRefs 
 
This error will occur when reference path configured for the parameter 
MCU_E_CLOCK_FAILURE is not correct in the path 
 
ERR_59_101_007:      Reference path configured for the parameter 
MCU_E_WRITE_TIMEOUT_FAILURE is not correct in the path 
<Mcu/McuModuleConfiguration/McuDemEventPrameterRefs. 
 
This error will occur when reference path configured for the parameter 
MCU_E_WRITE_TIMEOUT_FAILURE is not correct in the path 
53 

 
 
 
 
 
 
 
       Chapter 9  
Messages 
 
 
 
ERR_59_101_008:      Value configured for the parameter McuModeType  is 
repeating in the path Mcu/McuModuleConfiguration/McuModeSettingConf. It should 
be unique within configset. 
 
This error will occur when value configured for the parameter McuModeType  is 
repeating in the path Mcu/McuModuleConfiguration/McuModeSettingConf 
 
ERR_59_101_009:        Value configured for the parameter 
McuWakeUpFactorName in the path Mcu/McuModuleConfiguration/ 
McuModeSettingConf0/ McuWakeUpFactorDetails should not be repeated within 
the McuWakeUpFactorDetails container 
 
This error will occur when value configured for the parameter 
McuWakeUpFactorName in the path Mcu/McuModuleConfiguration/ 
McuModeSettingConf0/ McuWakeUpFactorDetails is repeated within the 
McuWakeUpFactorDetails container 
 
ERR_59_101_010:      Reference path configured for the parameter 
MCU_E_POWERDOWN_MODE_FAILURE is not correct in the path 
<Mcu/McuModuleConfiguration/McuDemEventPrameterRefs 
 
This error will occur when reference path configured for the parameter 
MCU_E_POWERDOWN_MODE_FAILURE is not correct in the path 
 
ERR_59_101_012:   WakeUpTrigger of a particular domain cannot be enabled 
when StopTrigger of the same domain is disabled in the path 
<Mcu/McuModuleConfiguration/McuModeSettingConf>. 
 
This error will occur when WakeUpTrigger is expected from a particular domain 
when StopTrigger of the same domain is disabled in the path 
 
ERR_59_101_013:   McuGTMCMUClock = $McuCMUClk is repeating in 
McuGTMClockSettings container in configset $ConfigSetCount. 
 
This error will occur when the McuGTMCMUClock is repeating in 
McuGTMClockSettings container in configsets  
 
ERR_59_101_014:   This value of OPBT1.PLL0FREQ = $McuPLLFreq is not 
supported for P1H-C devices. 
 
This error will occur when the OPBT1.PLL0FREQ is not supported for P1H-C 
devices. 
 
ERR_59_101_015:   The configured value of PLL clock should be equal to 
$McuReqPLLClock MHz. 
 
This error will occur when the configured value of PLL clock is not equal to 
$McuReqPLLClock MHz. 
 
ERR_59_101_016:   The configured value of McuOPBT1Sel = $McuOPBT1Sel is 
not supported. 
 
This error will occur when the configured value of McuOPBT1Sel is not supported. 
ERR_59_101_017: The value of the parameter McuEcmDelayTimerOverflowValue 
= $McuEcmDelTimOverVal Hz is out of range.    
This error will occur when the value of McuEcmDelayTimerOverflowValue is not in 
range. 
54 
 

 
 
 
 
 
 
       Messages 
Chapter 9 
 
ERR_59_101_018:  The value of the parameter McuClm0MonitoringClockAccuracy 
= $McuClm0MonClockAcc Hz is out of range.  
This error will occur when the value of the McuClm0MonitoringClockAccuracy is not 
in range. 
ERR_59_101_019: The value of the parameter McuClm0SamplingClockAccuracy = 
$McuClm0SamClockAcc Hz is out of range. 
This error will occur when the value of the McuClm0SamplingClockAccuracy is not 
in range. 
ERR_59_101_020: The value of the parameter McuClm1MonitoringClockAccuracy 
= $McuClm1MonClockAcc Hz is out of range. 
This error will occur when the value of the McuClm1MonitoringClockAccuracy is not 
in range. 
ERR_59_101_021: The value of the parameter McuClm1SamplingClockAccuracy = 
$McuClm1SamClockAcc Hz is out of range. 
This error will occur when the value of the McuClm1SamplingClockAccuracy is not 
in range. 
ERR_59_101_022: The value of the parameter McuClm2MonitoringClockAccuracy 
= $McuClm2MonClockAcc Hz is out of range. 
This error will occur when the value of the McuClm2MonitoringClockAccuracy is not 
in range. 
 ERR_59_101_023: The value of the parameter McuClm2SamplingClockAccuracy 
= $McuClm2SamClockAcc Hz is out of range. 
This error will occur when the value of the McuClm2SamplingClockAccuracy is not 
in range. 
ERR_59_101_024: The value of the parameter McuClm3MonitoringClockAccuracy 
= $McuClm3MonClockAcc Hz is out of range. 
This error will occur when the value of the McuClm3MonitoringClockAccuracy is not 
in range 
ERR_59_101_025: The value of the parameter McuClm3SamplingClockAccuracy = 
$McuClm3SamClockAcc Hz is out of range. 
This error will occur when the value of the McuClm3SamplingClockAccuracy is not 
in range 
ERR_59_101_028: The value of the parameter McuLoopCount = $McuLoopCt Hz is 
out of range. 
This error will occur when the value of the McuLoopCount is not in range. 
 ERR_59_101_029:   The value of the parameter McuMainOsciFrequency is invalid 
in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuMainOsciFrequency is not in range. 
 ERR_59_101_030: The value of the parameter McuCpuMainSysClk = 
$McuCpuClk Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount.  
55 

 
 
 
 
 
 
 
       Chapter 9  
Messages 
 
 
This error will occur when the value of the McuCpuMainSysClk is not in range. 
ERR_59_101_031: The value of the parameter McuPeripheralClock = 
$McuPeriClock Hz is out of range in the container 
McuClockSettingConfig$ClockCount in McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuPeripheralClock is not in range. 
ERR_59_101_032: The value of the parameter McuExternalClk0DividerSel = 
$McuExtClk0DivSel Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuExternalClk0DividerSel is not in 
range. 
 ERR_59_101_033: The value of the parameter McuExternalClock0 = $McuExtClk0 
Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount.   
This error will occur when the value of the McuExternalClock0 is not in range. 
ERR_59_101_034: The value of the parameter McuExternalClk1DividerSel = 
$McuExtClk1DivSel Hz is out of range McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount.            
This error will occur when the value of the McuExternalClk1DividerSel is not in 
range.      
ERR_59_101_035: The value of the parameter McuExternalClock1 = $McuExtClk1 
Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuExternalClock1 is not in range.     
ERR_59_101_036: The value of the parameter McuPLLClk0DividerSel = 
$McuPLLClk0DivSel Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuPLLClk0DividerSel is not in range.     
ERR_59_101_037: The value of the parameter McuPLLClock0 = $McuPLLClock0 
Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuPLLClock0 is not in range.    
ERR_59_101_038: The value of the parameter McuPLLClk1DividerSel = 
$McuPLLClk1DivSel Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuPLLClk1DividerSel is not in range.   
ERR_59_101_039: The value of the parameter McuOPBT1Sel = $McuOPBT1Se 
Hz is out of range in McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuOPBT1Sel is not in range.  
ERR_59_101_040: The value of the parameter McuPeripheralClock = 
$McuPeripClock Hz is out of range in the container McuSAWdtCounterClk in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuPeripheralClock is not in range. 
56 
 

 
 
 
 
 
 
       Messages 
Chapter 9 
 
ERR_59_101_041: The value of the parameter McuGTMCMUGCLKNumerator = 
$McuGTMCMUGCLKNum Hz is out of range in 
McuGTMClockSettingsConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuGTMCMUGCLKNumerator is not in 
range. 
ERR_59_101_042: The value of the parameter McuGTMCMUGCLKDenominator = 
$McuGTMCMUGCLKDen Hz is out of range in 
McuGTMClockSettingsConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuGTMCMUGCLKDenominator is not 
in range.  
ERR_59_101_043: The value of the parameter McuGTMChannelClkSrcDivider = 
$McuGTMChClkSrcDiv Hz is out of range in McuGTMClockSettings$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
ERR_59_101_044: The value of the parameter McuRamDefaultValue = 
$McuRamDefVal Hz is out of range in McuRamSectorSettingConf$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuRamDefaultValue is not in range. 
ERR_59_101_045: The value of the parameter McuRamSectionBaseAddress = 
$McuRamSecBaseAdd Hz is out of range in 
McuRamSectorSettingConf$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuRamSectionBaseAddress is not in 
range. 
ERR_59_101_046: The value of the parameter McuRamSectionSize = 
$McuRamSecSize   Hz is out of range in McuRamSectorSettingConf$ClockCount in 
McuModuleConfiguration$ConfigSetCount. 
This error will occur when the value of the McuRamSectionSize is not in range. 
ERR_59_101_047: The calculated output frequency for the McuExternalClock0 
exceeds 20000000 Hz in the container McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount 
This error will occur when the value of the McuExternalClock0 exceeds 20000000 
Hz. 
ERR_59_101_048: The calculated output frequency for the McuExternalClock1 
exceeds 20000000 Hz in the container McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount 
This error will occur when the value of the McuExternalClock1 exceeds 20000000 
Hz. 
ERR_59_101_049: The configured value of McuExternalClock0 should be equal to 
$McuClkVal0 Hz in the container McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount 
This error will occur when the value of the McuExternalClock0 is not matching with 
McuClkVal0. 
57 

 
 
 
 
 
 
 
       Chapter 9  
Messages 
 
 
ERR_59_101_050: The configured value of McuExternalClock1 should be equal to 
$McuClkVal1 Hz in the container McuClockSettingConfig$ClockCount in 
McuModuleConfiguration$ConfigSetCount 
This error will occur when the value of the McuExternalClock1 is not matching with 
McuClkVal1.  
ERR_59_101_051: The value of the parameter McuClm4MonitoringClockAccuracy 
= $McuClm4MonClockAcc Hz is out of range. 
This error will occur when the value of the McuClm4MonitoringClockAccuracy is not 
in range.  
ERR_59_101_052: The value of the parameter McuClm4SamplingClockAccuracy = 
$McuClm4SamClockAcc Hz is out of range. 
This error will occur when the value of the McuClm4SamplingClockAccuracy is not in 
range. 
ERR_59_101_053: The parameter 'MCU_E_INT_INCONSISTENT' in the 
McuDemEventParameterRefs Container should be configured, because the 
'McuInterruptConsistencyCheck' in $McuGeneral container is true 
This error occur when ''McuInterruptConsistencyCheck ' in 
McuGeneralConfiguration container is configured as true and 
MCU_E_INT_INCONSISTENT in McuDemEventParameterRefs is not configured. 
 
ERR_59_101_054: Reference path configured for the parameter 
MCU_E_INT_INCONSISTENT in McuModuleConfiguration$ConfigSetCount is not 
correct in the container McuDemEventParameterRefs 
This error occur when ''McuInterruptConsistencyCheck ' in 
McuGeneralConfiguration container is configured as true and 
MCU_E_INT_INCONSISTENT in McuDemEventParameterRefs is not configured 
correctly. 
 
ERR_59_101_055: The value configured for the parameter 
McuWriteVerifyErrorInterface in the container $McuGeneral shall not be Empty or 
NULL,since McuUseWriteVerifyErrorInterface is configured as True. 
This error occur when '' McuUseWriteVerifyErrorInterface ' in 
McuGeneralConfiguration container is configured as true and 
McuWriteVerifyErrorInterface is not configured. 
 
ERR_59_101_056: The parameter 'MCU_E_REG_WRITE_VERIFY' in the 
McuDemEventParameterRefs Container should be configured, because the 
'McuWriteVerify' in $McuGeneral container is true. 
This error occur when '' McuWriteVerify' in McuGeneralConfiguration container is 
configured as true and 'MCU_E_REG_WRITE_VERIFY’ in 
McuDemEventParameterRefs is not configured. 
 
ERR_59_101_057:  Reference path configured for the parameter 
MCU_E_REG_WRITE_VERIFY in McuModuleConfiguration$ConfigSetCount is not 
correct in the container McuDemEventParameterRefs 
This error occur when '' McuWriteVerify' in McuGeneralConfiguration container is 
configured as true and 'MCU_E_REG_WRITE_VERIFY’ in 
McuDemEventParameterRefs is not configured correctly. 
58 
 

 
 
 
 
 
 
       Messages 
Chapter 9 
 
 
ERR_59_101_058: The value of the parameter McuEcmErrorMaskableInterrupt or 
McuEcmErrorNonMaskableInterrupt should be true for McuEcmErrorSource<16, 17, 
48 and 49> since the parameter McuGetRamStateApi is configured as true in the 
McuGeneralConfiguration container. 
This error will occur when the parameters McuEcmErrorMaskableInterrupt or 
McuEcmErrorNonMaskableInterrupt are not configured as true when the the 
parameter McuGetRamStateApi is configured as true in the 
McuGeneralConfiguration container. 
 
                        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. 
 
ERR_59_101_059: The value of the parameter McuClmaXOperation should be 
configured as true since the parameter McuClmaxSelfDiagnostic Test is configured 
as true in the McuGeneralConfiguration container
 
This error occur when McuClmaxSelfDiagnosticTest in McuGeneralConfiguration 
container is configured as true and McuClmaXOperation is configured as false. 
 
 
ERR_59_101_060: The value configured for the parameter 
MCU_E_CLM_SELFDIAG_FAILURE in the McuDemEventParameterRefs 
Container in McuModuleConfiguration$ConfigSetCount shall not be empty or NULL 
when any of the parameters 'McuClma0SelfDiagnosticTest' or 
'McuClma1SelfDiagnosticTest' or 'McuClma2SelfDiagnosticTest' or 
'McuClma3SelfDiagnosticTest' or 'McuClma4SelfDiagnosticTest' in 
'McuGeneralConfiguration' is configured as true. 
 
For device R7F701373 and R7F701374  
 
The value configured for the parameter MCU_E_CLM_SELFDIAG_FAILURE in the 
McuDemEventParameterRefs Container in 
McuModuleConfiguration$ConfigSetCount shall not be empty or NULL when any of 
the parameters 'McuClma0SelfDiagnosticTest' or 'McuClma0SelfDiagnosticTest' or 
'McuClma2SelfDiagnosticTest' or 'McuClma3SelfDiagnosticTest'' in 
'McuGeneralConfiguration' is configured as true for P1M-C devices. 
 
This error occur when McuClma<0,1,2,3,4>SelfDiagnosticTest in 
McuGeneralConfiguration container is configured as true and 
MCU_E_CLM_SELFDIAG_FAILURE in McuDemEventParameterRefs is not 
configured. 
 
ERR_59_101_061: Reference path configured for the parameter 
MCU_E_CLM_SELFDIAG_FAILURE in McuModuleConfiguration$ConfigSetCount 
is not correct in the container McuDemEventParameterRefs 
 
This error occur when McuClma<0,1,2,3,4>SelfDiagnosticTest in 
McuGeneralConfiguration container is configured as true and 
MCU_E_CLM_SELFDIAG_FAILURE in McuDemEventParameterRefs is not 
configured correctly. 
 
ERR_59_101_062: The parameter MCU_E_CLM_SELFDIAG_FAILURE in the 
McuDemEventParameterRefs Container in 
McuModuleConfiguration$ConfigSetCount should be configured, because the 
parameter McuEcmSelfDiagnosticTest in McuGeneralConfiguration container is 
configured as true". 
 
59 

 
 
 
 
 
 
 
       Chapter 9  
Messages 
 
 
This error occur when 'McuEcmSelfDiagnosticTest' in McuGeneralConfiguration 
container is configured as true and MCU MCU_E_ECM_SELFDIAG_FAILURE in 
McuDemEventParameterRefs is not configured. 
 
ERR_59_101_063: Reference path configured for the parameter 
MCU_E_ECM_SELFDIAG_FAILURE in McuModuleConfiguration$ConfigSetCount 
is not correct in the container McuDemEventParameterRefs 
 
This error occur when 'McuEcmSelfDiagnosticTes’' in McuGeneralConfiguration 
container is configured and MCU_E_ECM_SELFDIAG_FAILURE in 
McuDemEventParameterRefs is not configured correctly. 
 
 
ERR_59_101_064: The parameter MCU_E_CVM_SELFDIAG_FAILURE in the 
McuDemEventParameterRefs Container in 
McuModuleConfiguration$ConfigSetCount should be configured, because the 
parameter 'McuCvmSelfDiagnosticTest' in McuGeneralConfiguration container is 
configured as true" 
 
This error occur when 'McuCvmSelfDiagnosticTest' in McuGeneralConfiguration 
container is configured as true and MCU_E_CLM_SELFDIAG_FAILURE in 
McuDemEventParameterRefs is not configured. 
 
 
ERR_59_101_065: Reference path configured for the parameter 
MCU_E_CVM_SELFDIAG_FAILURE in McuModuleConfiguration$ConfigSetCount 
is not correct in the container McuDemEventParameterRefs 
 
This error occur when 'McuCvmSelfDiagnosticTest' in McuGeneralConfiguration 
container is configured and MCU_E_CLM_SELFDIAG_FAILURE in 
McuDemEventParameterRefs is not configured correctly. 
 
ERR_59_101_066: The parameter MCU_E_LOCKSTEP_SELFDIAG_FAILURE in 
the McuDemEventParameterRefs Container in 
McuModuleConfiguration$ConfigSetCount should be configured, because the 
parameter ' McuLockStepSelfDiagnosticTest' in McuGeneralConfiguration container 
is configured as true" 
 
This error occur when ' McuLockStepSelfDiagnosticTest' in 
McuGeneralConfiguration container is configured as true and 
MCU_E_LOCKSTEP_SELFDIAG_FAILURE in McuDemEventParameterRefs is not 
configured. 
 
ERR_591_01_067: Reference path configured for the parameter 
MCU_E_LOCKSTEP_SELFDIAG_FAILURE in 
McuModuleConfiguration$ConfigSetCount is not correct in the container 
McuDemEventParameterRefs 
 
This error occur when ' McuLockStepSelfDiagnosticTest ' in 
McuGeneralConfiguration container is configured and 
MCU_E_LOCKSTEP_SELFDIAG_FAILURE in McuDemEventParameterRefs is not 
configured correctly. 
 
ERR_59_101_068: The parameters 'McuEcmErrorMaskableInterrupt' and 
'McuEcmErrorNonMaskableInterrupt' are configured as true for the error source 
McuEcmErrorContainer. 
 
This error occur when McuEcmErrorMaskableInterrupt and 
McuEcmErrorNonMaskableInterrupt is configured for same error source. 
60 
 

 
 
 
 
 
 
       Messages 
Chapter 9 
 
 
 
ERR_59_101_069: The parameter 'McuEcmErrorMIDelayTimer' cannot be true 
since the interrupt 'McuEcmErrorMaskableInterrupt' is configured as false for the 
same error source McuEcmErrorContainer. 
 
This error occur when McuEcmErrorNMIDelayTimer configured without configuring 
McuEcmErrorMaskableInterrupt of same error source. 
 
ERR_59_101_070:
 The parameter 'McuEcmErrorNMIDelayTimer' cannot be true 
since the interrupt 'McuEcmErrorNonMaskableInterrupt' is configured as false for 
the same error source McuEcmErrorContainer. 
 
This error occur when McuEcmErrorNMIDelayTimer configured without configuring 
McuEcmErrorNonMaskableInterrupt of same error source. 
 
 
9.2  Warning Messages 
 
WARNING_59_101_001:   Since the McuModeType parameter is configured as 
MCU_MODULE_STANBY_MODE, stop trigger of any of the Target domain in the 
path Mcu/McuModuleConfiguration / McuModeSettingConf need to be enabled. 
 
 
9.3  Information Messages 
 
INFO_59_101_001:  The Time Period of the each GTM CMU clock TCMU_CLK[x] is 
calculated as,   
 
TCMU_CLK[x]  =  ((CMUGlobalClockNumerator/CMUGlobalClockDenominator)  * 
TSYS_CLK) * (ChannelClkSrcDivider + 1). 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61 

 
 
 
 
 
 
 
       Chapter 9  
Messages 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62 
 

 
 
Revision History 
 
 
Sl.No Description 
Version  Date 
. 

Initial Version 
1.0.0 
14-Aug-2015 

The following changes are made: 
1.0.1 
15-Apr-2016 
1. 
R number is added in the last page 
2. 
Added McuGTMConfigurationSupport in 8.1.1 
3. 
Added McuGTMClockSettings and McuOPBT1Sel in 8.1.2 
4. 
Updated McuExternalClkOutSetting and McuPLLClkSetting in 8.1.2 
5. 
Added parameter for GTM support  in Figure 8-1  
                  Configuration overview. 
6. 
Added error message ERR_59_101_013 , ERR_59_101_014 , 
ERR_59_101_015, ERR_59_101_016  in 10.1.1 Error Messages 
7. 
Added Information message in Section 10.3 
8. 
Description added for error messages in 10.1.1 Error Messages 
9. 
Compiler version updated in 9.3 User Environment Settings 
10.  Added Information message INFO_59_101_001 in Section 10.3. 
 

Following changes are made 
1.0.2 
27-Jan-2017 
 
1. 
The type of the parameters 
McuClm0MonitoringClockAccuracy,McuClm1MonitoringClockAccuracy, 
McuClm2MonitoringClockAccuracy, McuClm3MonitoringClockAccuracy, 
McuClm0SamplingClockAccuracy, McuClm1SamplingClockAccuracy, 
McuClm2SamplingClockAccuracy, McuClm3SamplingClockAccuracy, are 
changed from integer to float in section 8.1.1 
2. 
In section 10.1, error messages ERR_59_101_017 to ERR_59_101_067 
are added and ERR_59_101_029 is updated. 
3. 
In section 8.1.1, parameters McuClm4MonitoringClockAccuracy, 
McuClm4SamplingClockAccuracy, McuInterruptConsistencyCheck, 
McuUseWriteVerifyErrorInterface, McuWriteVerifyErrorInterface, 
McuWriteVerify, Clma Self Diagnosis, McuCvmSelfDiagnosticTest, 
McuEcmSelfDiagnosticTest, McuLockStepSelfDiagnosticTest are added. 
4. 
Updated section 8.1.2 post build configuration parameters. 
5. 
Removed Translation XML File from Definition. 
6. 
Updated Chapters 1,3,4,5,6,7 by rephrasing Tool and MCU Driver 
Generation Tool  with MCAL Code Generator Tool 
7. 
Removed Chapter 9 Generation Tool Options, Chapter-10 Notes. 
8. 
Updated Chapter 3 with a remark for common MCAL Code Generator Tool 
user manual 
9. 
Renamed the Chapter 3 heading as Code Generation Overview. 
10.  Chapter-4 description rephrased and Flow chart in chapter 3 updated. 
11.  Updated parameter McuMainOsciFrequency in table 8-2 as enumeration 
type. 
12.  ERR_59_101_026 and  ERR_59_101_027 are removed. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AUTOSAR MCAL R4.0.3 User's Manual 
MCU Driver Component Ver.1.0.2 
Generation Tool User's Manual 
 
Publication Date: Rev.1.00,   January 27, 2017 
 
 
Published by: Renesas Electronics Corporation 
 



 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
SALES  OFFICES 
 
http://www.renesas.com 
 
Refer  to "http://www.renesas.com/" for the latest  and  detailed  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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
R20UT3652EJ0100 
 
 
 
 

Document Outline