Watchdog Driver
Watchdog Driver
Component Documentation
1 - R20UT3728EJ0101-AUTOSAR
AUTOSAR MCALR4.0 User's Manual3 - R20UT3728EJ0101-AUTOSARs


AUTOSAR MCAL R4.0.3
User’s Manual
WDG Driver Component Ver.1.0.8
Embedded User’s Manual
Target Device:
RH850/P1x
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website
(http://www.renesas.com). www.renesas.com Rev.1.01 Feb 2017
2
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits,
software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and
damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents,
copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information
described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas
Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics
disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copy or
otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended
applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication
equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or
bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and undersea
repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any
and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the
product is not intended by Renesas Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General
Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges
specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation characteristics,
installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of the use of Renesas
Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas
Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the
possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics
products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your products/system.
Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the final products or
systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas
Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances, including
without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all these applicable
laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale
is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or technologies for (1)
any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction, such as nuclear weapons,
chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose
relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and
security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or technologies to any third party whether directly
or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When
exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and
regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and
conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from your
resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned
subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
3
4
Abbreviations and Acronyms Abbreviation / Acronym Description ADC
Analog Digital Converter
ANSI
American National Standards Institute
API
Application Programming Interface
AUTOSAR
Automotive Open System ARchitecture
ARXML
AUTOSAR Markup EXtensible Language
BSW
Basic SoftWare
CAN
Controller Area Network
DEM
Diagnostic Event Manager
DET/Det
Development Error Tracer
DIO
Digital Input And Output
ECU
Electronic Control Unit
EEPROM
Electrical Erasable Programmable Read Only Memory
FR
FlexRay
GHS
Green HillS
GNU
GNU is Not Unix
GPT
General Purpose Timer
HW
HardWare
ID/Id
Identifier
ISR
Interrupt Service Routine
IMR
Interrupt Mask Register
I/O
Input/Output
ICU
Input Capture Unit
INTWDTn
Interrupt Watch Dog Timer.
LIN
Local Interconnect Network
MCAL
Microcontroller Abstraction Layer
MCU
MicroController Unit
MHz
Mega Hertz
OS
Operating System
PWM
Pulse Width Modulation
PDF
Parameter Definition File
RAM
Random Access Memory
ROM
Read Only Memory
RTE
Run Time Environment
SCI
Serial Communication Interface
SPI
Serial Peripheral Interface
SCHM/SchM
Scheduler Manager
SV
Supervisor Mode
SW
SoftWare
WDG/wdg
WatchDog
WDT
WatchDog Timer
WDGIF
WatchDog Interface
5
WDTAnTRES
WatchDog Timer A Trigger Reset
WDTATCKI
WatchDog Timer A Trigger Clock Input
WDTAnMD
WatchDog Timer Mode
WDTAnREF
Watch Dog Timer A Reference
Definitions Term Represented by Sl. No.
Serial Number
WDTAEVAC
Watchdog Timer Enable Register for Varying Activation Code
WDTAMD
Watchdog Timer Mode Register
WDTAWDTE
Watchdog Timer Enable Register for Fixed Activation Code
6
Table of Contents Chapter 1 Introduction ..................................................................... 11 1.1. Document Overview ........................................................................................................... 13 Chapter 2 Reference Documents ..................................................... 15 Chapter 3 Integration And Build Process ....................................... 17 3.1. WDG Driver Component Makefile ..................................................................................... 17 3.1.1. Folder Structure.................................................................................................... 17 Chapter 4 Forethoughts ................................................................... 19 4.1. General ................................................................................................................................. 19 4.2. Preconditions ...................................................................................................................... 20 4.3. Data Consistency ................................................................................................................ 20 4.4. WDG State Diagram ............................................................................................................ 21 4.5. WDTA 75% ISR Usage Details for R4.0.3 .......................................................................... 22 4.6. Deviation List ...................................................................................................................... 24 4.7. User mode and supervisor mode ...................................................................................... 25 4.8. Register Write Verify .......................................................................................................... 25 Chapter 5 Architecture Details ......................................................... 27 Chapter 6 Registers Details ............................................................. 29 Chapter 7 Interaction Between The User And WDG Driver
Component .......................................................................................... 31 7.1. Services Provided By WDG Driver Component To the User .......................................... 31 Chapter 8 WDG Driver Component Header And Source File
Description .......................................................................................... 33 Chapter 9 Generation Tool Guide .................................................... 37 Chapter 10 Application Programming Interface ............................... 39 10.1. Imported Types ................................................................................................................... 39 10.1.1. Standard Types .................................................................................................... 39 10.1.2. Other Module Types ............................................................................................. 39 10.2. Type Definitions .................................................................................................................. 39 10.2.1. Wdg_59_DriverA_ConfigType .............................................................................. 39 10.3. Function Definitions ........................................................................................................... 40 10.3.1 Wdg_59_DriverA_Init ........................................................................................... 40 10.3.2 Wdg_59_DriverA_SetMode ................................................................................. 41 10.3.3 Wdg_59_DriverA_SetTriggerCondition ................................................................ 41 10.3.4 Wdg_59_DriverA_GetVersionInfo ........................................................................ 42 7
Chapter 11 Development And Production Errors ............................. 43 11.1. WDG Driver Component Development Errors ................................................................. 43 11.2. WDG Driver Component Production Errors ..................................................................... 44 Chapter 12 Memory Organization ...................................................... 45 Chapter 13 P1M Specific Information ................................................ 47 13.1. Interaction Between The User And WDG Driver Component .......................................... 47 13.1.1. ISR Function Mapping Interrupt Vector Table ...................................................... 47 13.1.2. Translation Header File ........................................................................................ 47 13.1.3. Parameter Definition File ...................................................................................... 48 13.2. Sample Application............................................................................................................. 48 13.2.1 Sample Application Structure ............................................................................... 48 13.2.2 Building Sample Application ................................................................................. 50 13.2.2.1 Configuration Example ..................................................................... 50 13.2.2.2 Debugging The Sample Application ................................................. 50 13.3. Memory and Throughput for R4.0.3 .................................................................................. 51 13.3.1 ROM/RAM Usage ................................................................................................ 51 13.3.2 Stack Depth .......................................................................................................... 52 13.3.3 Throughput Details ............................................................................................... 52 Chapter 14 Release Details ................................................................ 53 8
List of Figures Figure 1-1 System Overview Of AUTOSAR Architecture ...................................................... 11 Figure 1-2 System Overview Of The WDG Driver In AUTOSAR MCAL Layer ...................... 12 Figure 4-1 State Diagram of WDG ......................................................................................... 21 Figure 4-2 WDG behavior during Data exchange with hardware ........................................... 22 Figure 4-3 WDG behavior when Wdg_SetTriggerCondition is called ................................... 23 Figure 5-1 Watch Driver And Watchdog Interface Architecture ............................................ 27 Figure 5-2 Basic Architecture Of WDG Component .............................................................. 28 Figure 12-1 Memory Organization Of WDG Driver Component .............................................. 45 Figure 13-1 Overview Of WDG Driver Sample Application ..................................................... 48 List of Tables
Table 4-1 WDG Driver Deviation List ................................................................................... 24 Table 4-2 AUTOSAR Deviation List ..................................................................................... 25 Table 4-3 Supervisor mode and User mode details ............................................................. 25 Table 6-1 Register Details .................................................................................................... 29 Table 8-1 Description Of The WDG Driver Component Files ............................................... 34 Table 10-1 APIs provided by the WDG Driver Component .................................................... 40 Table 11-1 DET Errors of WDG Driver Component ............................................................... 43 Table 11-2 DEM Errors of WDG Driver Component............................................................... 44 Table 13-1 Interrupt Vector Table .......................................................................................... 47 Table 13-2 PDF information for P1M ...................................................................................... 48 Table 13-3 ROM/RAM Details Without DET .......................................................................... 51 Table 13-4 ROM/RAM Details With DET ............................................................................... 52 Table 13-5 Throughput Details Of The APIs .......................................................................... 52 9
10
Introduction Chapter 1 Chapter 1 Introduction The purpose of this document is to describe the information related to WDG
Driver Component for Renesas P1x microcontrollers.
This document shall be used as reference by the users of WDG Driver
Component for P1M Device. The information specific to P1M Device like,
compiler, linker, assembler, integration and build process for application
along with the memory consumption and throughput information are
provided.
This document shall be used as reference by the users of WDG Driver
Component. This document describes the common features of WDG
Driver Component. This document is intended for the developers of ECU
software using Application Programming Interfaces provided by
AUTOSAR. The system overview of complete AUTOSAR architecture is
shown in the below Figure:
Application Layer
AUTOSAR RTE
System Services
On board Device Abstraction
WDG Driver Microcontroller
Figure 1-1 System Overview Of AUTOSAR Architecture The WDG Component comprises embedded software and the Configuration
Tool to achieve scalability and configurability.
The WDG Generation Tool is a command line tool that accepts ECU
configuration description files as input and generates source and header files.
The configuration description is an ARXML file that contains information about
the configuration for Watchdog timer. The tool generates the
Wdg_59_DriverA_PBcfg.c, Wdg_59_DriverA_Cfg.h and
Wdg_59_DriverA_Cbk.h for Watchdog Driver A.
11
Chapter 1 Introduction The Figure in the following page depicts the WDG Driver as part of layered
AUTOSAR MCAL Layer:
Microcontroller Drivers
Memory Drivers
Communication Drivers
I/O Drivers
In
Ex
In
te
Wa t
r
S
te
e
n
GP
M
r
a
P
Fl
tcr
P
n
C
R
n
l
I
PWM
CU
a
C
H
L
e
A
I
D
O
ha
E
CU
o
A
T
l
dl
a
I
A
x
DC
I
r
M
EP
N
R
O
R
F
o e
F
n
N
D
Dr
g l
ay
l
a
d
Dr
Dr
T
r
Te
T
a
R
D
i
s
le
D
Dr
D
D
v
iv
De
s
r
h
O
iv
r
h
r
D
iv
ri
er
i
iv
iv
r
er
s
st
D
rt
M
er
v
ri
er
v
i
Dr
i v Dr
er
r
er
er
er
v
v
er
i
ei
Dr
v
er
iv
v
e
re
er
i
r
r
v
er
E
P
GP
W
x
F
E
L
CA
IC
P
Cl
o
M
t.
L
E
SPI
A
S
I
DI
w
N
W
D
Micro B
A
M
P
o
CU
C
U
DC
N
T
e
T
ck
US
S
RO
O
r
I
o
M
&
H
r
Controller Figure 1-2 System Overview Of The WDG Driver In AUTOSAR MCAL Layer Watchdog Driver module provides the services for initializing, changing the
operation mode and triggering the watchdog.
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 Section 1 (Introduction)
This section provides an introduction and overview of WDG 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 WDG
Process)
Driver Component. This section also explains about the Makefile
descriptions, Integration of WDG Driver Component with other
components, building the WDG Driver Component along with a sample
application.
Section 4 (Forethoughts)
This section provides brief information about the WDG Driver
Component, the preconditions that should be known to the user before it
is used, data consistency details, WDG State Diagram, WDTA 75% ISR
Usage Details, deviation list, Support For Different Interrupt Categories,
user-mode and supervisor mode API support list, register read-back.
Section 5 (Architecture Details)
This section describes the layered architectural details of the WDG
Driver Component.
Section 6 (Register Details)
This section describes the register details of WDG Driver Component.
Section 7 (Interaction Between
This section describes interaction of the WDG Driver Component with
The User And WDG Driver
the upper layers.
Component)
Section 8 (WDG Driver
This section provides information about the WDG Driver Component
Component Header And Source
source files is mentioned. This section also contains the brief note on the
File Description)
tool generated output file.
Section 9 (Generation Tool Guide) This section provides information on the WDG Driver Component Code
Generation Tool.
Section 10 (Application
This section explains all the APIs provided by the WDG Driver
Programming Interface)
Component.
Section 11 (Development And
This section lists the DET and DEM errors.
Production Errors)
Section 12 (Memory
This section provides the typical memory organization, which must be
Organization)
met for proper functioning of component.
Section 13 (P1M Specific
This section provides the P1M Specific Information.
Information)
Section 14 (Release Details)
This section provides release details with version name and base
version.
13
Chapter 1 Introduction 14
Reference Documents Chapter 2 Chapter 2 Reference Documents Sl. No. Title Version 1.
Autosar R4.0
2.5.0
AUTOSAR_SWS_WatchdogDriver.pdf
2.
AUTOSAR BUGZILLA (http://www.autosar.org/bugzilla) -
Note: AUTOSAR BUGZILLA is a database, which contains concerns raised
against information present in AUTOSAR Specifications.
3.
r01uh0436ej0130_rh850p1x.pdf
1.30
4.
AUTOSAR_SWS_CompilerAbstraction.pdf
3.2.0
5.
AUTOSAR_SWS_MemoryMapping.pdf
1.4.0
6.
AUTOSAR_SWS_PlatformTypes.pdf
2.5.0
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 WDG Driver Component is explained.
Description of the Makefiles along with samples is provided in this section.
Remark The details about the C Source and Header files that are generated by the
WDG Driver Generation Tool are mentioned in the
“R20UT3729EJ0101-AUTOSAR.pdf”.
3.1. WDG Driver Component Makefile The Makefile provided with the WDG Driver Component consists of the GNU
Make compatible script to build the WDG 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\common_platform\modules\wdg\src\ Wdg_59_DriverA.c
\Wdg_59_DriverA_Irq.c
\Wdg_59_DriverA_Private.c
\Wdg_59_DriverA_Ram.c
\Wdg_59_DriverA_Version.c
X1X\common_platform\modules\wdg\include\Wdg_59_DriverA.h
\Wdg_59_DriverA_Debug.h
\Wdg_59_DriverA_Irq.h
\Wdg_59_DriverA_PBTypes.h
\Wdg_59_DriverA_Private.h
\Wdg_59_DriverA_Ram.h
\Wdg_59_DriverA_RegWrite.h
\Wdg_59_DriverA_Types.h
\Wdg_59_DriverA_Version.h
X1X\P1x\modules\wdg\sample_application\<SubVariant>\make\<Complier>
\App_WDG_P1M_Sample.mak
X1X\P1x\modules\wdg\sample_application\<SubVariant>\obj\<Complier>
(Note: For example, compiler can be ghs.)
X1X\P1x\modules\wdg\generator
17
Chapter 3 Integration And Build Process \R403_WDG_P1x_BSWMDT.arxml
X1X\common_platform\modules\wdg\generator\Wdg_X1x.dll
tools\RUCG\RUCG.exe
X1X\P1x\common_family\generator
\Sample_Application_P1x.trxml
\P1x_translation.h
X1X\P1x\modules\wdg\user_manual
(User manuals will be available in this folder)
Notes: 1. <Compiler> can be ghs.
2. <SubVariant> can be P1M.
3. <AUTOSAR_version> should be 4.0.3.
18
Forethoughts Chapter 4 Chapter 4 Forethoughts 4.1. General Following information will aid the user to use the WDG Driver Component
software efficiently:
•
The WDG Component does not enable or disable the ECU or
Microcontroller power supply. The upper layer should handle this
operation.
•
Option byte values required for the operation of watchdog will be flashed
through Start up code.
•
The WDG Component does not implement any scheduled functions.
•
WDG Component Implements Call Back Notification function to notify
WriteVerify Error.
•
Example code mentioned in this document shall be taken only as a
reference for implementation.
•
The Watchdog hardware supports only Driver A. Hence, WDG Driver
Component is implemented as Driver A. WDG_DRIVER_INSTANCE
variable of Base Make file is updated for Driver A.
•
All development errors will be reported to Det by using the API
Det_ReportError() provided by DET.
•
All production errors will be reported to Dem by using the API
Dem_ReportErrorStatus() provided by DEM.
•
It should be ensured that the respective clock source is switched ON
before Watchdog is set to corresponding Clock Unit in
Wdg_59_DriverA_Init() API.
•
The API Wdg_59_DriverA_SetTriggerCondition() initializes the trigger
counter global variable with timeout value divided by either slow or fast time
Value generated by the configuration.
•
For WDG Reset functionality in debug mode, unmask the reset in debug
mode during debug session with GHS command "target pinmask k".
•
The file Interrupt_VectorTable.c provided is just a Demo and not all
interrupts will be mapped in this file. So the user has to update the
Interrupt_VectorTable.c as per his configuration.
•
The accesses to HW registers is possible only in the low level driver layer.
The MCAL user does never write or read directly from any register, but
uses the AUTOSAR standard API provided by the MCAL.
•
The Wdg_SetMode() function must only support mode change from
WDGIF_OFF_MODE to WDGIF_FAST_MODE or WDGIF_SLOW_MODE.
This is a limitation by the hardware and WDG cannot be stopped in run
time.
•
"WDG_SETTINGS_SLOW" and "WDG_SETTINGS_FAST" is configured
from the list of clock selections (16 choices are possible) and depending on
the mode configured for "WDG_DEFAULT_MODE", watchdog settings is
initialized in the API Wdg_59_DriverA_Init ().
19
Chapter 4 Forethoughts 4.2. Preconditions Following preconditions have to be adhered by the user, for proper
functioning of the WDG Driver Component:
•
The user should ensure that WDG Component API requests are invoked in
the correct and expected sequence along with correct input arguments.
•
User should ensure that the appropriate option bytes are flashed for the
configured mode in the watchdog driver module.
•
Validation of input parameters are done only when the static configuration
parameter WDG_59_DRIVERA_DEV_ERROR_DETECT is enabled.
Application should ensure that the right parameters are passed while
invoking the APIs when WDG_59_DRIVERA_DEV_ERROR_DETECT is
disabled.
•
A mismatch in the version numbers will result in compilation error. Ensure
that the correct versions of the header and the source files are used.
•
The files Wdg_59_DriverA_Cfg.h, Wdg_59_DriverA_PBcfg.c and
Wdg_59_DriverA_Cbk.h generated using watchdog driver generation tool
has to be linked along with WDG Component source files.
•
File Wdg_59_DriverA_PBcfg.c generated for single configuration set using
Watchdog Driver Generation Tool can be compiled and linked
independently.
•
The WDG Component needs to be initialized before accepting any API
requests. Wdg_59_DriverA_Init should be called by the ECU State
Manager Module to initialize WDG Component. It should not be called
more than once.
•
User have the responsibility to enable or disable the critical protection
using the parameter WdgCriticalSectionProtection. By enabling parameter
WdgCriticalSectionProtection, Microcontroller HW registers which suffer
from concurrent access by multiple tasks are protected.
4.3. Data Consistency To support the re-entrance and interrupt services, the AUTOSAR WDG
component will ensure the data consistency while switching the watchdog
mode and during the watchdog trigger routine. The WDG Driver component
will use SchM_Enter_Wdg and SchM_Exit_Wdg functions. The
SchM_Enter_Wdg function is called before the data needs to be protected
and SchM_Exit_Wdg function is called after the data is accessed.
The following exclusive areas along with scheduler services are used to
provide data integrity for shared resources:
TRIGG_PROTECTION
MODE_SWITCH_PROTECTION
The protection areas TRIGG_PROTECTION and
MODE_SWITCH_PROTECTION are used to protect the WDG
triggering and WDG mode switching respectively.
The functions SchM_Enter_Wdg and SchM_Exit_Wdg can be disabled by
disabling the configuration parameter ‘WdgCriticalSectionProtection’.
20
Forethoughts Chapter 4 Note: The highest measured duration of a critical section is 1.575 micro
seconds measured for Wdg_59_DriverA_SetMode API.
4.4. WDG State Diagram The State diagram of WDG Driver is as shown below
Figure 4-1 State Diagram of WDG
WDG Driver supports following modes
1.WDGIF_OFF_MODE
2.WDGIF_SLOW_MODE
3.WDGIF_FAST_MODE
Like shown in the above figures when WDG Driver is initialized by the API
Wdg_59_DriverA_Init(), the WDG Driver gets into one of the modes based on
the default value configured during configuration. When default mode is
WDGIF_OFF_MODE, Wdg_59_DriverA_Init() will not try to disable the WDG.
It will just not start the WDG counter. Also the modes can be changed by the
API Wdg_59_DriverA_SetMode() only once after Wdg_59_DriverA_Init(), if
the current mode is WDGIF_OFF_MODE.
21
Chapter 4 Forethoughts 4.5. WDTA 75% ISR Usage Details for R4.0.3 WDG Driver using '75% interrupt output' feature services the Watchdog
hardware to trigger watchdog hardware as long as the trigger condition is
valid. If the trigger condition becomes invalid the Wdg Driver stops triggering
and the watchdog expires.
Maximum counter
value 0xFFFF
75% of maximum
counter value
Counter Value
Wdg_59_DriverA_Init()
75% of Time Period
Reset Release
Wdg_59_DriverA_SetTriggerCondition()
Wdg_59_DriverA_SetTriggerCondition()
INTWDTn(75% Interrupt)
WDG Trigger
B
A
A
WDTAnTRES
Figure 4-2 WDG behavior during Data exchange with hardware
22
Forethoughts Chapter 4
Figure 4-3 WDG behavior when Wdg_SetTriggerCondition is called Note User should adjust the Timeout value in such a way that the corrections of 'A’
and 'B' are considered while passing the 'timeout' value to API
'Wdg_59_DriverA_SetTriggerCondition’.
The above figure illustrates the scenario where
Wdg_59_DriverA_SetTriggerCondition API
is called before the expiry of the Initial Timeout value.
The 75% duration calculation for one WDG trigger cycle in slow mode WDTATCKI = 240 kHz
For example, considering current mode settings = WDTATCKI/2^16
Period = 2^16/240k = 0.273 sec
Total window time = 273 msec
75% interrupt time = 204.7 msec
Generation tool will round off the 75% interrupt time “204.7 msec” to “205
msec” and rounded value is displayed on the command prompt. For the
above example the information on command prompt for slow mode will be
displayed as given below.
The duration of 75% of one WDG trigger cycle for slow mode is <205
msec> If the timeout value passed by the API Wdg_59_DriverA_Settriggercondition
is 410 msec, then the counter value will be calculated in the WDG Driver as
2.
23
Chapter 4 Forethoughts The duration of 75% of one WDG trigger cycle calculation for fast mode WDTATCKI = 240 kHz
For example, considering current mode settings = WDTATCKI/2^9
Period = 2^9/240k = 0.0021 sec
Total window time = 2.1 msec
75% interrupt time = 1.5 msec
Generation tool will round off the 75% interrupt time “1.5 msec” to “2 msec”
and rounded value is displayed on the command prompt. For the above
example the information on command prompt for fast mode will be displayed
as given below.
The duration of 75% of one WDG trigger cycle for fast mode is <2
msec> If the timeout value passed by the API
Wdg_59_DriverA_Settriggercondition() is 50 msec, then the counter value
will be calculated in the WDG Driver as 25.
The API Wdg_59_DriverA_SetTriggerCondition() will not trigger the
watchdog hardware it will only calculate the trigger counter value.
In General, the user should use the below formula while calculating the
Timeout Period by considering the corrections of 75% duration round off, A
and B values.
Timeout Period = (Trigger Count)* (75% of Time Period + A)+B
where ‘A” is the time required for the ISR to trigger the WDG hardware and
‘B’ is the time gap between Wdg_59_DriverA_SetTriggerCondition() execution
and next WDG trigger from 75% ISR.
4.6. Deviation List Table 4-1 WDG Driver Deviation List Sl. No. Description AUTOSAR Bugzilla 1.
'WDG116_Conf' -
‘WdgDisableAllowed’ will have no effect if it is configured
as TRUE due to Hardware limitation.
2.
'WDG025 ','WDG173'
-
WDG HW unit does not allow itself to be disabled, this is a
limitation. Therefore, if default mode given in the provided
configuration set is WDGIF_OFF_MODE,
Wdg_59_DriverA_Init function will not try to disable the
WDG. It will just not start the WDG counter. Also
Wdg_59_DriverA_Init shall not report production error
WDG_E_MODE_FAILED.
3.
If the API Wdg_59_DriverA_SetTriggerCondition, is
-
invoked with the timeout value "0" will not result in
instantaneous watchdog reset of the ECU like mentioned
in WDG140, instead the trigger counter will be set to "0"
and watchdog reset will occur after the WatchDog counter
value has reached its maximum value.
24
Forethoughts Chapter 4 4.
‘WDG163’
-
Wdg triggering for servicing the hardware watchdog is
handled by
WDG_59_DRIVERA_TRIGGERFUNCTION_ISR interrupt
service routine.
GPT callbacks are not used for servicing the Watchdog
hardware.
Table 4-2 AUTOSAR Deviation List Sl.No. Autosar ID Description Justification 1.
BSW00347
Naming separation of different
Renesas WDG driver doesn't follow
instances of BSW drivers
BSW00347 Autosar requirement
regarding naming separation of different
instances of BSW drivers.
4.7. User mode and supervisor mode The below table specifies the APIs which can run in user mode, supervisor
mode or both modes
Table 4-3 Supervisor mode and User mode details Sl.No API Name User Supervisor Known Mode mode limitation
in User 1
mode Wdg_59_DriverA_Init
-
x
-
2
Wdg_59_DriverA_SetMode
x
x
-
3
Wdg_59_DriverA_SetTriggerCondition
x
x
-
4
Wdg_59_DriverA_GetVersionInfo
x
x
-
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.8. Register Write Verify Register write-verify is a functional safety based implementation, where the
verification of the control register’s content after the write operation is carried
out. 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 purpose of this implementation is to detect random HW faults
(transient / permanent) This can happen on the bus while writing to the
configuration registers or because of faulty registers which will potentially lead
to wrong configuration and wrong operation.
25
Chapter 4 Forethoughts
26
Architecture Details Chapter 5 Chapter 5 Architecture Details The WDG Driver architecture is shown in the following figure. The WDG user
shall directly use the APIs to configure and execute the WDG conversions:
Watchdog Interface
Watchdog Driver Hardware Registers
Figure 5-1 Watch Driver And Watchdog Interface Architecture Watchdog Interface invokes the corresponding Driver. The Driver APIs will
access the hardware register of the Watchdog Timers for changing the mode
and trigger the Watchdog Timer.
Watchdog Driver component:
The Watchdog Driver component is composed of following modules:
•
Watchdog Driver Initialization module
•
Watchdog Driver SetMode module
•
Watchdog Driver SetTriggerCondition module
•
Watchdog Driver VersionInfo module
27
Chapter 5 Architecture Details The basic architecture of the Watchdog Driver component is illustrated in the
following figure:
Watch Dog Driver Initialization Module SetMode Module SetTriggerCondition VersionInfo Module Module Figure 5-2 Basic Architecture Of WDG Component
Watchdog Driver Initialization module:
This module initializes the watchdog driver and watchdog hardware. It
provides the API Wdg_59_DriverA_Init(). This API should be invoked before
the usage of any other APIs of Watchdog Driver Module.
Watchdog Driver SetMode module:
This module will handle the functionality for setting the modes. It provides the
API Wdg_59_DriverA_SetMode(). Following are the possible mode settings:
•
WDGIF_SLOW_MODE
•
WDGIF_FAST_MODE
Remark The above settings are configured using the WDTAMD register. SetMode will
support mode switch as described in the
chapter 4.4 WDG State Diagram.
SetMode API will set module’s state to WDG_BUSY during execution and
reset the module’s state to WDG_IDLE before return.
Watchdog Driver SetTriggerCondition module:
This module will handle the functionality to reset the watchdog timeout
counter according to the timeout value passed. It provides the API
Wdg_59_DriverA_SetTriggerCondition.
There are two types of Activation codes to trigger the Watchdog. They are
•
Fixed Activation Code.
•
Varying Activation code.
Depending on the Activation code chosen, this function has to trigger the
corresponding register.
•
WDTAWDTE register will be used for Fixed Activation Code.
•
WDTAEVAC register will be used for Varying Activation Code.
Watchdog Driver VersionInfo module:
This module will provide the current version of the Watchdog Driver Module. It
contains the API Wdg_59_DriverA_GetVersionInfo().
28
Registers Details Chapter 6 Chapter 6 Registers Details This section describes the register details of WDG Driver Component.
Table 6-1 Register Details API Name Registers Config Parameter Register Macro/Variable Access r/w/rw Wdg_59_DriverA_Init IMRn
-
rw
WDG_59_DRIVERA_INTWDTIM
R_MASK
WDTAnMD
WdgDefaultMode
rw
ucWdtamdDefaultValue.
WDTAnEVAC
WdgVaryingActivationC rw
WDG_59_DRIVERA_RESTART,
odeMode
WDG_59_DRIVERA_WDTAREF
_ADDRESS
WDG_59_DRIVERA_WDTAEVAC
WDTAnWDT
WdgVaryingActivationC rw
WDG_59_DRIVERA_WDTAWDT
_MASK
odeMode
E_M
E
ASK,
WDG_59_DRIVERA_RESTART
WDTAnREF
-
r
WDG_59_DRIVERA_WDTAREF
_ADDRESS
Wdg_59_DriverA_Set WDTAnMD
-
rw
ucWdtamdSlowValue,
Mode
ucWdtamdFastValue.
WDTAnEVAC
WdgVaryingActivationC rw
WDG_59_DRIVERA_RESTART,
odeMode
WDG_59_DRIVERA_WDTAREF
_ADDRESS
WDTAnWDT
WdgVaryingActivationC rw
WDG_59_DRIVERA_WDTAWDT
E
odeMode
E_MASK,
WDG_59_DRIVERA_WDTAEVAC
WDG_59_DRIVERA_RESTART
_MASK
WDTAnREF
-
r
WDG_59_DRIVERA_WDTAREF
_ADDRESS
Autosar R4.0:
-
-
-
-
Wdg_59_DriverA_S
etTriggerCondition
Wdg_59_DriverA_Get -
-
-
-
VersionInfo
29
Chapter 6 Registers Details 30
Interaction Between The User And WDG Driver Component Chapter 7 Chapter 7 Interaction Between The User And WDG Driver Component The details of the services supported by the WDG Driver Component to the
upper layer users are provided in the following sections:
7.1. Services Provided By WDG Driver Component To the
User The WDG Driver Component provides the following functions to upper layers:
•
To Initialize Watchdog Timer
•
To Set the Mode of the Watchdog Timer
•
To handle the functionality of calculating the trigger counter value
•
To Read the WDG Component Version Information.
31
Chapter 7 Interaction Between The User And WDG Driver Component 32
WDG Driver Component Header And Source File Description Chapter 8 Chapter 8 WDG Driver Component Header And Source File Description This section explains the WDG 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 WDG Driver Generation Tool:
•
Wdg_59_DriverA_Cfg.h
•
Wdg_59_DriverA_Cbk.h
The C source file generated by WDG Driver Generation Tool:
•
Wdg_59_DriverA_PBcfg.c
The WDG Driver Component C header files:
•
Wdg_59_DriverA.h
•
Wdg_59_DriverA_Debug.h
•
Wdg_59_DriverA_Irq.h
•
Wdg_59_DriverA_PBTypes.h
•
Wdg_59_DriverA_Private.h
•
Wdg_59_DriverA_Ram.h
•
Wdg_59_DriverA_Types.h
•
Wdg_59_DriverA_Version.h
•
Wdg_59_DriverA_RegWrite.h
The WDG Driver Component source files:
•
Wdg_59_DriverA.c
•
Wdg_59_DriverA_Irq.c
•
Wdg_59_DriverA_Private.c
•
Wdg_59_DriverA_Ram.c
•
Wdg_59_DriverA_Version.c
The Stub C header files:
•
Compiler.h
•
Compiler_Cfg.h
•
MemMap.h
•
Platform_Types.h
•
rh850_Types.h
•
Dem.h
•
Dem_Cfg.h
•
Std_Types.h
•
Det.h
33
Chapter 8 WDG Driver Component Header And Source File Description •
Os.h
•
Rte.h
•
SchM_Wdg_59_DriverA.h
•
WdgIf_Types.h
The description of the WDG Driver Component files is provided in the table
below:
Table 8-1 Description Of The WDG Driver Component Files File Details Wdg_59_DriverA_Cfg.h
This file is generated by the WDG Generation Tool for various WDG component
pre-compile time parameters. Generated macros and the parameters will vary
with respect to the configuration in the input ARXML file.
Wdg_59_DriverA_PBcfg.c
This file contains post-build configuration data. The structures related to WDG
Initialization are provided in this file. Data structures will vary with respect to
parameters configured.
Wdg_59_DriverA_Cbk.h
This file contains Prototype Declarations for WDG callback Notification
Functions.
Wdg_59_DriverA.h
This file provides extern declarations for all the WDG Component APIs. This file
provides service IDs of APIs, DET Error codes and type definitions for
Watchdog Driver initialization structure. This header file shall be included in
other modules to use the features of WDG Component.
Wdg_59_DriverA_Debug.h
This file provides Provision of global variables for debugging purpose.
Wdg_59_DriverA_Irq.h
It contains the external declaration for the interrupt functions used by WDG
Driver component.
Wdg_59_DriverA_PBTypes.h
This file contains the macros used internally by the WDG Component code and
the structure declarations related to watchdog control registers.
Wdg_59_DriverA_Private.h
This file contains the declarations of the internally used functions.
Wdg_59_DriverA_Ram.h
This file contains the extern declarations for the global variables that are
defined in Wdg_59_DriverA_Ram.c file and the version information of the file.
Wdg_59_DriverA_Types.h
This file contains the common macro definitions and the data types required
internally by the WDG software component.
Wdg_59_DriverA_Version.h
This file contains the macros of AUTOSAR version numbers of all modules that
are interfaced to WDG.
Wdg_59_DriverA_RegWrite.h
This file contains macro definitions for the registers write-verify functionality.
Wdg_59_DriverA.c
This file contains the implementation of all APIs.
Wdg_59_DriverA_Irq.c
This file contains the implementation of all the interrupt functions used by WDG
Driver Component.
Wdg_59_DriverA_Private.c
This file contains the definition of the internal functions that access the
hardware registers.
Wdg_59_DriverA_Ram.c
This file contains the global variables used by WDG Component.
Wdg_59_DriverA_Version.c
This file contains the code for checking version of all modules that are
interfaced to WDG.
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.
34
WDG Driver Component Header And Source File Description Chapter 8 File Details rh850_Types.h
This file provides macros to perform supervisor mode (SV) write enabled
Register ICxxx and IMR register writing using OR/AND/Direct operation.
Dem.h
This file is a stub for DEM component
Dem_Cfg.h
This file contains the stub values for Dem_Cfg.h
Std_Types.h
Provision for Standard types
Det.h
This file is a stub for DET component.
Rte.h
This file is a stub for Rte Component.
Os.h
This file is a stub for OS component
SchM_Wdg_59_DriverA.h
This file is a stub for SchM Component
WdgIf_Types.h
This file contains the common macro definitions and the Type definition for the
current status and mode of Watchdog Driver.
35
Chapter 8 WDG Driver Component Header And Source File Description 36
Generation Tool Guide Chapter 9 Chapter 9 Generation Tool Guide For information on the WDG Driver Component Code Generation Tool,
please refer “R20UT3729EJ0101-AUTOSAR.pdf” document.
37
Chapter 9 Generation Tool Guide 38
Application Programming Interface Chapter 10 Chapter 10 Application Programming Interface This section explains the Data types and APIs provided by the WDG Driver
Component to the Upper layers.
10.1. Imported Types This section explains the Data types imported by the WDG 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 section all types included from the WdgIf_Types.h and Dem.h are listed.
•
WdgIf_ModeType
•
WdgIf_Statustype
•
Dem_EventIdType
•
Dem_EventStatusType
10.2. Type Definitions This section explains the type definitions of WDG Driver Component
according to AUTOSAR Specification.
10.2.1. Wdg_59_DriverA_ConfigType Name: Wdg_59_DriverA_ConfigType
Type: Structure
Type Name Explanation unit32
ulStartOfDbToc
Database start
value
uint32
ulInitTimerCountValue
Trigger counter
value
uint32
ulSlowTimeValue
SLOW mode
value of
WDTAMD
register
uint32
ulFastTimeValue
FAST mode
value of
WDTAMD
register
Element: uint8
ucWdtamdSlowValue
WDTAnMD
register value for
the Slow Mode.
39
Chapter 10 Application Programming Interface uint8
ucWdtamdFastValue
WDTAnMD
register value for
the Fast Mode.
uint8
ucWdtamdDefaultValue
Watchdog
default mode
WdgIf_ModeType
ddWdtamdDefaultMode
Default mode
value configured
by the user
Description: This is the type of the data structure required for initializing the Watchdog Hardware unit.
10.3. Function Definitions This section explains the APIs provided by the WDG Driver Component.
Table 10-1 APIs provided by the WDG Driver Component SI.No API’s 1.
Wdg_59_DriverA_Init
2.
Wdg_59_DriverA_SetMode
3.
Wdg_59_DriverA_SetTriggerCondition
4.
Wdg_59_DriverA_GetVersionInfo
10.3.1 Wdg_59_DriverA_Init Name: Wdg_59_DriverA_Init
FUNC(void, WDG_59_DRIVERA_PUBLIC_CODE) Wdg_59_DriverA_Init
Prototype: (P2CONST(Wdg_59_DriverA_ConfigType, AUTOMATIC,
WDG_59_DRIVERA_APPL_CONST) ConfigPtr)
Service ID: 0x00
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range Wdg_59_DriverA_Config ConfigPtr
NA
Parameters In: Type
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: None
NA
Description: This service initialize the Watchdog hardware.
Configuration None
Dependency: Preconditions: None
40
Application Programming Interface Chapter 10 10.3.2 Wdg_59_DriverA_SetMode Name: Wdg_59_DriverA_SetMode
FUNC(Std_ReturnType, WDG_59_DRIVERA_PUBLIC_CODE)
Prototype: Wdg_59_DriverA_SetMode (WdgIf_ModeType Mode)
Service ID: 0x01
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range WdgIf_ModeType
Mode
1. WDGIF_OFF_MODE
Parameters In: 2. WDGIF_SLOW_MODE
3. WDGIF_FAST_MODE
Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: Std_ReturnType
E_OK or E_NOT_OK
Description: This service change the mode of the Watchdog timer.
Configuration None
Dependency: Preconditions: Wdg_59_DriverA_Init must be called before this function.
10.3.3 Wdg_59_DriverA_SetTriggerCondition Name: Wdg_59_DriverA_SetTriggerCondition
FUNC(void, WDG_59_DRIVERA_PUBLIC_CODE)
Prototype: Wdg_59_DriverA_SetTriggerCondition (uint16 timeout)
Service ID: 0x03
Sync/Async: Synchronous
Reentrancy: Non-Reentrant
Type Parameter Value/Range uint16
timeout
NA
Parameters In: Parameters InOut: None
NA
NA
Parameters out: None
NA
NA
Type Possible Return Values Return Value: None
NA
Description: This service is used to initialize the trigger counter.
Configuration None
Dependency: Preconditions: Wdg_59_DriverA_Init must be called before this
function.
41
Chapter 10 Application Programming Interface 10.3.4 Wdg_59_DriverA_GetVersionInfo Name: Wdg_59_DriverA_GetVersionInfo
FUNC(void, WDG_59_DRIVERA_PUBLIC_CODE)
Prototype: Wdg_59_DriverA_GetVersionInfo(P2VAR
(Std_VersionInfoType, AUTOMATIC, WDG_59_DRIVERA_APPL_CONST)
versioninfo)
Service ID: 0x04
Sync/Async: Synchronous
Reentrancy: Reentrant
Type Parameter Value/Range None
NA
NA
Parameters In: Parameters InOut: None
NA
NA
Parameters out: Std_VersionInfoType
versioninfo
NA
Type Possible Return Values Return Value: None
NA
Description: This service returns the version information of this module.
Configuration None
Dependency: Preconditions: None
42
Development And Production Errors Chapter 11 Chapter 11 Development And Production Errors In this section the development errors that are reported by the WDG Driver
Component are tabulated. The development errors will be reported only when
the pre compiler option WdgDevErrorDetect is enabled in the configuration.
11.1. WDG Driver Component Development Errors The following table contains the DET errors that are reported by WDG Driver
Component. These errors are reported to Development Error Tracer Module
when the WDG Driver Component APIs are invoked with wrong input
parameters or without initialization of the driver.
Table 11-1 DET Errors of WDG Driver Component Sl. No. 1 Error Code
WDG_59_DRIVERA_E_PARAM_CONFIG
Related API(s)
Wdg_59_DriverA_Init
Source of Error
When the API service is called with a configuration set which is not within the allowed
boundaries.
Sl. No. 2 Error Code
WDG_59_DRIVERA_E_PARAM_MODE
Related API(s)
Wdg_59_DriverA_SetMode
Source of Error
When the API service is called the Driver is not possible to change the mode.
Sl. No. 3 Error Code
WDG_59_DRIVERA_E_DRIVER_STATE
Related API(s)
Wdg_59_DriverA_SetMode and Wdg_59_DriverA_SetTriggerCondition,
WDG_59_DRIVERA_TRIGGERFUNCTION_ISR.
Source of Error
If the API service is called when the driver state is not in idle state.
Sl. No. 4 Error Code
WDG_59_DRIVERA_E_INVALID_DATABASE
Related API(s)
Wdg_59_DriverA_Init
Source of Error
When the API service is called with wrong database.
Sl. No. 5 Error Code
WDG_59_DRIVERA_E_PARAM_TIMEOUT
Related API(s)
Wdg_59_DriverA_SetTriggerCondition
Source of Error
When the API service Wdg_59_DriverA_SetTriggerCondition is called with timeout
value greater maximum timeout value (WdgMaxTimeout).
Sl. No. 6 Error Code
WDG_59_DRIVERA_E_PARAM_POINTER
Related API(s)
Wdg_59_DriverA_Init, Wdg_59_DriverA_GetVersionInfo
Source of Error
API service is called with NULL Pointer.
43
Chapter 11 Development And Production Errors 11.2. WDG Driver Component Production Errors The following table contains the DEM errors that are reported by WDG
Component
Table 11-2 DEM Errors of WDG Driver Component Sl. No. 1 Error Code
WDG_59_DRIVERA_E_DISABLE_REJECTED
Related API(s)
Wdg_59_DriverA_SetMode
Source of Error
If error during mode switch failed, the above error is reported to DEM
Sl. No. 2 Error Code
WDG_59_DRIVERA_E_MODE_FAILED
Related API(s)
Wdg_59_DriverA_SetMode
Source of Error
When switching between the modes is failed above error is reported to DEM.
Sl. No. 3 Error Code
WDG_59_DRIVERA_E_REG_WRITE_VERIFY
Related API(s)
In Wdg_59_DriverA_Init and Wdg_59_DriverA_SetMode API write verify failure
report DEM error.
Source of Error
Write verify failure is caused whenever a register is written and the register is not
updated with the written value then this error is reported.
Sl. No. 4 Error Code
WDG_59_DRIVERA_E_INT_INCONSISTENT
Related API(s)
WDG_59_DRIVERA_TRIGGERFUNCTION_ISR API
Source of Error
When ISR is invoked from incorrect interrupt source, then this error is reported.
44




















Application Programming Interface Chapter 10 Chapter 12 Memory Organization Following picture depicts a typical memory organization, which must be met
for proper functioning of WDG Component software.
ROM Section WDG Driver Component RAM ect Library Object es Global RAM required for WDG functioning.
WDG Driver component APIs are placed in this
Segment Name:
code memory.
Y1 NO_INIT_RAM_UNSPECIFIED X1 Segment Name:
WDG59_A_PUBLIC_CODE_ROM Global bit RAM to be initialized by WDG
Driver.
Segment Name:
Y2 WDG Driver code related to internal and ISR
NO_INIT_RAM_32BIT functions are placed in this memory.
Global bit RAM to be initialized by WDG
Segment Name:
X2 Driver.
WDG_59_DRIVERA_FAST_CODE_ROM Y3 Segment Name:
RAM_1BIT WDG Driver component APIs are placed in this
code memory.
Global bit RAM to be initialized by WDG
Driver.
X3 Y4 Segment Name:
Segment Name:
WDG59_A_PRIVATE_CODE_ROM RAM_UNSPECIFIED Tool Generated Files The const section in the file
Wdg_59_DriverA_PBCfg.c is placed in this
memory.
X4 Segment Name:
WDG59_A_CFG_DATA_UNSPECIFIED
Figure 12-1 Memory Organization Of WDG Driver Component
45
Chapter 12 Memory Organization ROM Section (X1, X2 ,X3 and X4): WDG59_A_PUBLIC_CODE_ROM (X1): API(s) of WDG Driver Component,
which can be located in code memory.
WDG_59_DRIVERA_FAST_CODE_ROM (X2): Internal and ISR functions of
WDG Driver Component code are placed in this code memory.
WDG59_PRIVATE_CODE_ROM (X3): Internal functions of WDG Driver
Component code that can be located in code memory.
WDG59_A_CFG_DATA_UNSPECIFIED (X4): This section consists of WDG
Component database generated by the Watchdog Driver Generation Tool
and the constant structures used in AUTOSAR Renesas WDG Driver
Component. This can be located in code memory.
RAM Section (Y1,Y2,Y3 and Y4 ): NO_INIT_RAM_UNSPECIFIED (Y1): This section consists of the global
RAM variables that are used internally by WDG Component and other
software components. The specific sections of respective software
components will be merged into this RAM section accordingly.
NO_INIT_RAM_32BIT (Y2): This section consists of the global RAM
variables of 32-bit size that are used internally by WDG 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 WDG software
component and other software components. The specific sections of
respective software components will be merged into this RAM section
accordingly.
RAM_UNSPECIFIED (Y4): This section consists of the global RAM variables
that are initialized by start-up code and used internally by WDG Component
and other software components. This can be located in data memory.
•
X1, X2, X3, Y1, Y2, Y3 and Y4 pertain to only WDG Component and do
not include memory occupied by Wdg_59_DriverA_PBCfg.c file generated
by Watchdog Driver Generation Tool.
•
User must ensure that none of the memory areas overlap with each other.
Even ‘debug’ information should not overlap.
46
P1M Specific Information Chapter 13 Chapter 13 P1M Specific Information P1M supports following devices:
R7F701304
R7F701305
R7F701310
R7F701311
R7F701312
R7F701313
R7F701314
R7F701315
R7F701318
R7F701319
R7F701320
R7F701321
R7F701322
R7F701323
13.1. Interaction Between The User And WDG Driver Component 13.1.1. ISR Function Mapping Interrupt Vector Table The table below provides the list of handler addresses corresponding to the
hardware unit ISR(s) in WDG Driver Component. The user should configure
the ISR functions mentioned below:
Table 13-1 Interrupt Vector Table Interrupt Source Name of the ISR Function Autosar R4.0 only
WDG_59_DRIVERA_TRIGGERFUNCTION_ISR
EI level mask able interrupt
WDG_59_DRIVERA_TRIGGERFUNCTION_CAT2_ISR
Note: The functions with “INTERRUPT “as pilot tag, provides an indication to the compiler that
the function following this tag is an interrupt function type. The tag name can vary according to
the compiler. User should take care of the tag name with respect to compiler used.
13.1.2. Translation Header File P1x_translation.h supports following devices:
R7F701304
R7F701305
R7F701310
R7F701311
R7F701312
R7F701313
47
Chapter 13 P1M Specific Information R7F701314
R7F701315
R7F701318
R7F701319
R7F701320
R7F701321
R7F701322
R7F701323
13.1.3. Parameter Definition File Parameter definition files support information for P1M
Table 13-2 PDF information for P1M PDF files Devices supported 701304, 701305, 701310, 701311, 701312, 701313,
R403_WDG_P1M_04_05_10_to_1
701314, 701315, 701318, 701319, 701320, 701321,
5_18_to_23.arxml
701322, 701323
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 WDG APIs can be invoked from the application.
Generic
V850 RH850 AUTOSAR TYPES COMPILER TYPES Devices
COMMON P1x STUB STUB STUB STUB Dem Det SchM WdgIf WDG WDG Sample Sample Application Application STUB Os
Figure 13-1 Overview Of WDG Driver Sample Application The Sample Application of the P1M is available in the path
X1X\P1x\modules\wdg\sample_application
The Sample Application consists of the following folder structure
X1X\P1x\modules\wdg\definition\<AUTOSAR_version>\<SubVariant>
48
P1M Specific Information Chapter 13 \ R403_WDG_P1M_04_05_10_to_15_18_to_23.arxml
X1X\P1x\modules\wdg\sample_application\<SubVariant>\<AUTOSAR_version>
\src\Wdg_59_DriverA_PBcfg.c
\inc\Wdg_59_DriverA_Cfg.h
\inc\Wdg_59_DriverA_Cbk.h
\config\App_WDG_P1M_701304_Sample.arxml
\config\App_WDG_P1M_701305_Sample.arxml
\config\App_WDG_P1M_701310_Sample.arxml
\config\App_WDG_P1M_701311_Sample.arxml
\config\App_WDG_P1M_701312_Sample.arxml
\config\App_WDG_P1M_701313_Sample.arxml
\config\App_WDG_P1M_701314_Sample.arxml
\config\App_WDG_P1M_701315_Sample.arxml
\config\App_WDG_P1M_701318_Sample.arxml
\config\App_WDG_P1M_701319_Sample.arxml
\config\App_WDG_P1M_701320_Sample.arxml
\config\App_WDG_P1M_701321_Sample.arxml
\config\App_WDG_P1M_701322_Sample.arxml
\config\App_WDG_P1M_701323_Sample.arxml
In the Sample Application all the WDG APIs are invoked in the following
sequence
When DriverA (WDTA0) is selected:
•
The API Wdg_59_DriverA_GetVersionInfo is invoked to get the version of
the WDG Driver module with a variable of Std_VersionInfoType, after the
call of this API the passed parameter will get updated with the WDG Driver
version details.
•
The API Wdg_59_DriverA_Init is invoked with a valid database address for
the proper initialization of the WDG Driver, all the WDG Driver control
registers and RAM variables will get initialized after this API is called.
•
The API Wdg_59_DriverA_SetMode is invoked with the mode which needs
to be set, this API changes the mode of the Watchdog.
The API Wdg_59_DriverA_SetTriggerCondition initializes the trigger counter
global variable with timeout value divided by either usSlowTimeValue or
usFastTimeValue based on the current mode of Watchdog'.
49
Chapter 13 P1M Specific Information 13.2.2 Building Sample Application 13.2.2.1 Configuration Example This section contains the typical configuration which is used for measuring
RAM/ROM consumption, stack depth and throughput details.
Configuration Details:
App_WDG_<SubVariant>_<Device_Number>_Sample.arxml
The <Device Number> indicates the device to be compiled, which can be
701304, 701305, 701310, 701311, 701312, 701313, 701314, 701315, 701318,
701319, 701320, 701321, 701322 and 701323.
Remark In this typical configuration, all the conversion modes available for WDG
Driver Component are configured so that each API’s throughput analysis could
be performed. Throughput is measured by toggling a port pin before invoking
the API and again toggling the same port pin after the execution of the API.
Following Opbyte setting shall be followed:
If Variable activation code is enabled, Opbyte value = 0x71DF3FFB.
If Variable activation code is disabled, Opbyte value = 0x719F3FFB.
In debug mode unmask the reset using GHS command "target pinmask".
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\common_family\make\<Complier>”
Now execute the batch file SampleApp.bat with following parameters
SampleApp.bat Wdg < AUTOSAR_version> <Device_Name>
•
After this, the tool output files will be generated with the configuration as
mentioned in App_WDG_<SubVariant>_<Device_Number>_Sample.arxml
file available in the path:
“X1X\P1x\modules\wdg\sample_application\<SubVariant>\<AUTOSAR_ve
rsion>\config”.
•
After this, all the object files, map file and the executable file
App_WDG_P1M_Sample.out will be available in the output folder
(“X1X\P1x\modules\wdg\sample_application\<SubVariant>\obj\
<Complier>”).
(Note: For example compiler can be ghs.)
•
The executable can be loaded into the debugger and the sample application
can be executed.
Remark Executable files with ‘*.out’ extension can be downloaded into the target
hardware with the help of Green Hills debugger.
50
P1M Specific Information Chapter 13 •
If any configuration changes (only post-build) are made to the ECU
Configuration Description files
“X1X\P1x\modules\wdg\<SubVariant>\<AUTOSAR_version>
\config\App_WDG_<SubVariant>_<Device_name>_Sample.arxml”
•
The database alone can be generated by using the following commands.
make –f App_WDG_<SubVariant>_Sample.mak generate_wdg_config
make –f App_WDG_<SubVariant>_Sample.mak
App_WDG_<SubVariant>_Sample.s37
•
After this, a flashable Motorola S-Record file
App_WDG_<SubVariant>_Sample.s37 is available in the output folder.
Notes: 1. <Compiler> can be ghs.
2. <Device_name> can be 701304, 701305, 701310, 701311, 701312,
701313, 701314, 701315, 701318, 701319, 701320, 701321, 701322
and 701323.
3. <AUTOSAR_version> can be 4.0.3.
4. <SubVariant> can be P1M
13.3. Memory and Throughput for R4.0.3 13.3.1 ROM/RAM Usage The details of memory usage for the typical configuration provided in Section
13.2.2.1
Configuration Example are provided in this section.
Table 13-3 ROM/RAM Details Without DET Sl. No ROM/R Segment Name Size in AM bytes for 701318 1.
ROM
WDG59_A_PUBLIC_CODE_ROM
374
WDG_59_DRIVERA_FAST_CODE_ROM
70
WDG59_A_CFG_DATA_UNSPECIFIED
20
WDG59_A_PRIVATE_CODE_ROM
0
2.
RAM
NO_INIT_RAM_UNSPECIFIED
5
WDG59_A_CFG_ DATA_UNSPECIFIED
RAM_8BIT
3
NO_INIT_RAM_32BIT
4
The details of memory usage for the typical configuration, with DET enabled
and all other configurations as provided in 13.2.2.1
Configuration Example are
provided in this section.
51
Chapter 13 P1M Specific Information Table 13-4 ROM/RAM Details With DET `
Segment Name Size in ROM/Rbytes for AM 701318 1.
ROM
WDG59_A_PUBLIC_CODE_ROM
6
42
WDG_59_DRIVERA_FAST_CODE_ROM
244
WDG59_A_CFG_DATA_UNSPECIFIED
20
WDG59_A_PRIVATE_CODE_ROM
136
2.
RAM
NO_INIT_RAM_UNSPECIFIED
5
RAM_8BIT
3
NO_INIT_RAM_32BIT
4
13.3.2 Stack Depth The worst-case stack depth for WDG Driver Component is 20 bytes for the
typical configuration provided in Section13.2.2.1
Configuration Example.
13.3.3 Throughput Details The throughput details of the APIs for the configuration mentioned in the
Section13.2.2.1
Configuration Example are listed here. The clock frequency
used to measure the throughput is 80MHz for all APIs.
Table 13-5 Throughput Details Of The APIs API Name Throughput in Remarks Sl. No. microsecond
for 701318 1.
Wdg_59_DriverA 1.8
Timing is measured with default
_Init
mode as
WDGIF_SLOW_MODE
2.
Wdg_59_DriverA 0.275
Timing is measured with
_SetMode
default mode as
WDGIF_SLOW_MODE
3.
Wdg_59_Driver
0.65
-
A_SetTriggerCo
n dition
4.
Wdg_59_DriverA 0.137
-
_GetVersionInfo
5.
WDG_59_DRIV
0.975
-
ERA_TRIGGER
FUNCTION_ISR
52
Release Details Chapter 14 Chapter 14 Release Details WDG Driver Software R4.0.3
Version: 1.0.12
53
Chapter 14 Release Details 54
Revision History Sl.No Description Version Date 1.
Initial Version
1.0.0
18-Oct-2013
2
Following changes are made:
1.0.1
04-Feb-2014
1. In chapter 2, Reference Documents and Device manual
version changed.
2.100 pin Device names are added.
3. Compiler version and options are changed.
4. ROM/RAM table is updated for 100 pin device.
5. Sample application folder path is updated for 100 pin
device.
3
Following changes are made:
1.0.2
26-Sep-2014
1. In chapter 2, Reference Documents and Device manual
version changed.
2 .In chapter 13, translation header file that supports
P1M devices are listed.
3. In chapter 13, sample application structure is modified
according to P1M supporting devices.
4. In chapter 13, 13.1.2 ISR Function Mapping Interrupt
Vector Table and 13.1.3 Parameter Definition File are
added.
5. In chapter 13, Throughput details and ROM/RAM Usage
are added.
4.
Headers are corrected in chaper10 and 11.
1.0.3
21-Nov-2014
5.
Following changes are made:
1.0.4
28-Apr-2015
1. Updated Chapter 4.1 to add notes.
2. Updated Chapter 13 to add new device support.
3. Removed sections for Compiler, Linker and Assembler.
4. Updated Chapter 13.3 with memory and throughput
details.
6.
Following changes are made:
1.0.5
29-Mar-2016
1. Updated Chapter 8 to change heading for stub files and
addition of stub file details.
2. Updated Chapter 6 ‘Register Details ‘to add register
access type.
3. Updated Section 4.6 ‘Deviation List’ to add Autosar
Deviation list.
4. Copyright information updated.
5. Updated chapter 4 ‘Forethoughts’ to add details on
register access.
6. Updated Chapter 13.3 with memory and throughput
details.
7. Updated Chapter 12 to change memory section of tool
generated file.
8 .Updated Chapter 14 ‘Release Details’ to update WDG
Driver Software version.
9. Updated section 4.1 to add notes.
10. Updated Chapter 3 and Chapter 9 to add R-Numbered
Tool User manual name.
11. Added R Number.
55
Sl.No Description Version Date 7.
Following changes are made:
1.0.6
13-Jul-2016
1. Section 3.1.1 is updated to add
Wdg_59_DriverA_RegWrite.h and remove
Wdg_59_DriverA_RegReadBack.h file
2. Section 4.4 is updated for State diagram of WDG Driver.
3. Section 4.6 Deviation List is updated.
4. Section 4.8 Register Read-Back is changed to Register
Write-verify.
5. Chapter 8 is updated to add
Wdg_59_DriverA_RegWrite.h and remove
Wdg_59_DriverA_RegReadBack.h file. Also add
Wdg_59_DriverA_Cbk.h under generated file.
6. Table 8-1 is updated for Wdg_59_DriverA_RegWrite and
Wdg_59_DriverA_Cbk.h and stub files.
7. Section 10.2.1 is updated to remove element
usDefaultTimeValue.
8. Table 11.2 is updated to add new DEM errors.
9. Removed *.html and *.one files from section 13.2.
10. Chapter 6 Register Details is Updated.
11. Chapter 12 Memory section is updated.
12. Section 13.1.1 ISR Function Mapping Interrupt Vector
Table is updated with note.
13. Added a ‘Note’ below the table 'Supervisor mode and
User mode details.
14. Table 11.1 is updated to add the DET error
WDG_59_DRIVERA_E_PARAM_POINTER
15. Chapter 14 Release details is updated with WDG
Driver.
16. Chapter 3 and 9 are updated with R-Numbered Tool
User manual name.
17. Version of R-number is updated at the end of
document.
18. Section 13.3 Memory and throughput Values are
updated.
19. Section 4.2 and 4.3 is updated with critical section
information.
20. Section 4.6 General is updated.
8.
Following changes are made
1.0.7
21-Oct-2016
1. Section 13.3 is updated for Memory and Throughput
details.
2. Chapter 12 is updated to remove NO_INIT_RAM_16BIT
and add NO_INIT_RAM_32BIT.
9
Following changes are made
1.0.8
15-Feb-2017
1.Abbreviation list is updated.
2.Section 10.3 Function Definitions is updated.
3.Chapter 14 release details version is updated.
4.Chapter 3 and 9 are updated with R-Numbered Tool
User manual name.
5.Version of R-number is updated at the end of document.
6.Notice and copyright information is updated.
7.Table of contents updated.
8.Table 4.1 WDG Driver Deviation List is updated to add
not implemented requirement ‘WDG163’.
9.Chapter 10.2.1 Wdg_59_DriverA_ConfigType is
updated.
10. Chapter 12 Memory Organization is updated.
9. Removed *.html and *.one files from section 13.2.
10. Updated Chapter 6 Register Details.
11.Chapter 12 Memory section is up
56 User mode details.
57
AUTOSAR MCAL R4.0.3 User's Manual WDG Driver Component Ver.1.0.8
Embedded User’s Manual Publication Date: Rev.1.01, February 15, 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
R20UT3728EJ0101
Document Outline
4 - R20UT3729EJ0101-AUTOSAR
AUTOSAR MCAL R4.0 User's Manual6 - R20UT3729EJ0101-AUTOSARs


AUTOSAR MCAL R4.0.3
User’s Manual
WDG Driver Component Ver.1.0.6
Generation Tool User’s Manual
Target Device:
RH850/P1x
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website
(http://www.renesas.com). www.renesas.com Rev.1.01 Feb 2017
2
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits,
software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and
damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents,
copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information
described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas
Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics
disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copy or
otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended
applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication
equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or
bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and undersea
repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any
and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the
product is not intended by Renesas Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General
Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges
specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation characteristics,
installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of the use of Renesas
Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas
Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the
possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics
products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention,
appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your products/system.
Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the final products or
systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas
Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances, including
without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all these applicable
laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale
is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or technologies for (1)
any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction, such as nuclear weapons,
chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose
relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and
security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or technologies to any third party whether directly
or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When
exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and
regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and
conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from your
resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned
subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
3
4
Abbreviations and Acronyms Abbreviation / Acronym Description API
Application Programming Interface
AUTOSAR
AUTomotive Open System ARchitecture
BSWMDT
Basic Software Module Description Template
Cbk
Callback Notification
DEM
Diagnostic Event Manager
ECU
Electronic Control Unit
ID/Id
Identifier
MCAL
MicroController Abstraction Layer
MCU
MicroController Unit
NMI
Non Maskable Interrupt
PDF
Parameter Definition File
PBcfg
Post-Build configuration
RUCG
Renesas Unified Code Generator
WDG/Wdg
Watchdog Driver
WDTA
Window Watchdog Timer A
XML
eXtensible Mark-up Language
Definitions Terminology Description BSWMDT File
This file contains Common Published Information of WDG driver.
ECU Configuration Description
Input file to WDG Driver Generation Tool. It is generated by ECU
File
Configuration Editor.
Sl.No.
Serial Number
Translation XML File
This file contains the translation and device specific header file path.
5
6
Table of Contents Chapter 1 Introduction ........................................................................................... 9 1.1 Document Overview .................................................................................................................. 9 Chapter 2 Reference ............................................................................................. 11 2.1 Reference Documents ............................................................................................................. 11 2.2 Trademark Notice .................................................................................................................... 11 Chapter 3 WDG Driver Generation Tool Overview ............................................. 13 Chapter 4 Input Files ............................................................................................ 15 Chapter 5 Output Files ......................................................................................... 17 Chapter 6 Precautions .......................................................................................... 19 Chapter 7 User Configuration Validation ............................................................ 21 Chapter 8 Messages ............................................................................................. 23 8.1 Error Messages ........................................................................................................................ 23 8.2 Warning Messages .................................................................................................................. 26 8.3 Information Messages ............................................................................................................. 26 Chapter 9 Notes .................................................................................................... 29
7
List of Figures Figure 3-1 Overview of WDG Driver Generation Tool ................................................................ 13 List of Tables Table 5-1 Output Files Description ............................................................................................ 17 Table 8-1 Parameters and Container related to error ERR102004 .......................................... 23 Table 8-2 Parameters and Container related to error ERR102005 .......................................... 24 8
Introduction Chapter 1 Chapter 1 Introduction The Watchdog Driver provides services for initialization, changing the
operation mode and triggering the Watchdog.
The WDG Driver module comprises of two sections as Embedded Software
and the Generation Tool to achieve scalability and configurability.
The document describes the features of the WDG Driver Generation Tool.
WDG Driver Generation Tool is a command line tool that extracts information
from ECU Configuration Description File and BSWMDT File and generates
WDG Driver C Source and C Header files (Wdg_59_DriverA_Cfg.h,
Wdg_59_DriverA_PBcfg.c and Wdg_59_DriverA_Cbk.h).
This document contains information on the options, input and output files of the
WDG Driver Generation Tool. In addition, this manual covers a step-by-step
procedure for the usage of tool. ECU Configuration Description File contains
information about WDG configuration.
Remark Based on the value for the parameter ‘VendorApiInfix’, WDG Generation Tool
generates Wdg_59_DriverA_Cfg.h, Wdg_59_DriverA_PBcfg.c and
Wdg_59_DriverA_Cbk.h files. Hence in this document
‘Wdg_59_DriverA_Cfg.h, Wdg_59 _DriverA_PBcfg.c and
Wdg_59_DriverA_Cbk.h’ terms are used.
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 (WDG Driver
Provides the WDG Driver Generation Tool Overview.
Generation Tool Overview)
Section 4 (Input Files)
Provides information about ECU Configuration Description File.
Section 5 (Output Files)
Explains the output files that are generated by the WDG Driver
Generation Tool.
Section 6 (Precautions)
Contains precautions to be taken during configuration of ECU
Configuration Description File.
Section 7 (User Configuration
Describes about user configuration validation done by the WDG Driver
Validation)
Generation Tool.
Section 8 (Messages)
Describes all the Error/Warning/Information messages of R4.0.3 which
helps the user to understand the probable reason for the same.
Section 9 (Notes)
Provides notes to help the user to understand this document better.
9
Chapter 1 Introduction 10
Reference Chapter 2 Chapter 2 Reference 2.1 Reference Documents The following table lists the documents referred to create this document:
Sl. No Title Version 1.
Autosar R4.0 2.5.0
AUTOSAR_SWS_WatchdogDriver.pdf
2.
P1x Parameter Definition File 1.0.5
R403_WDG_P1M_04_05_10_to_15_18_to_23.arxml
2.2 Trademark Notice Microsoft and Windows are trademarks/registered trademarks of Microsoft
Corporation.
11
Chapter 2 Reference 12
WDG Driver Generation Tool Overview Chapter 3 Chapter 3 WDG Driver Generation Tool Overview WDG Driver Generation Tool overview is shown below.
ECU Configuration Wdg_59_DriverA_Description File, WDG Driver Cfg.h, BSWMDT File, Generation Wdg_59_DriverA_Translation XML Tool PBcfg.c File and and Configuration Wdg_59_DriverA_XML File Cbk.h Figure 3-1 Overview of WDG Driver Generation Tool WDG Driver Generation Tool is a command line tool that extracts, analyzes
the configuration details provided in the input file and validates correctness of
the data and provides scalability and configurability for WDG Driver module. It
accepts ECU Configuration Description File(s), BSWMDT File, Translation
XML File and Configuration XML File as input and displays appropriate
context sensitive error messages for wrong input and exits. Tool creates the
Log file (Wdg.log) that contains the list of Error/Warning/Information
messages in the output directory.
For the error free input file, the tool generates the following output files:
Wdg_59_DriverA_Cfg.h, Wdg_59_DriverA_PBcfg.c and
Wdg_59_DriverA_Cbk.h
Wdg_59_DriverA_Cfg.h and Wdg_59_DriverA_Cbk.h will be compiled
and linked with WDG Driver Component. Wdg_59_DriverA_PBcfg.c will
be compiled and linked separately from the other C Source files and
placed in flash.
Remark •
In case of errors the generation tool returns a 1, in case of no errors the
generation tool returns a 0.
•
WDG Driver Generation Tool uses “Common Published Information” from
WDG module specific BSWMDT File. WDG module specific BSWMDT File
should not be updated manually since it is “Static Configuration” file.
13
Chapter 3 WDG Driver Generation Tool Overview 14
Input Files Chapter 4 Chapter 4 Input Files WDG Driver Generation Tool accepts ECU Configuration Description File(s),
BSWMDT File, Translation XML File and Configuration XML File as input.
WDG Driver Generation Tool needs information about WDG Driver module.
Hence ECU Configuration Description File should contain configuration of
WDG Driver module. Generation Tool ignores any other AUTOSAR
component configured in the ECU Configuration Description File. ECU
Configuration Description File can be generated using configuration editor.
ECU Configuration Description File must comply with AUTOSAR standard
ECU Configuration Description File format.
Remark The detailed explanation about the parameters and containers are found in
Parameter Definition File mentioned in the Reference Documents section.
15
Chapter 4 Input Files 16
Output Files Chapter 5 Chapter 5 Output Files WDG Driver Generation Tool generates configuration details in C Header and
C Source files (Wdg_59_DriverA_Cfg.h, Wdg_59_DriverA_PBcfg.c and
Wdg_59_DriverA_Cbk.h).
The content of each output file is given in the table below:
Table 5-1 Output Files Description Output File Details Wdg_59_DriverA_
This file contains pre-compile time parameters. This file also contains the macro
Cfg.h
definitions for development error detect, version info API, compile switch to allow/
forbid disabling Watchdog Driver during runtime and Watchdog Driver Id. This file also
contains information for maximum Watchdog Timer timeout, Minimum Watchdog
Timer timeout, configuration set handles, resolution of Watchdog time out period and
Watchdog trigger mode.
Wdg_59_DriverA_
This file contains post-build configuration data.
PBcfg.c
Wdg_59_DriverA_
This file contains Prototype Declarations for WDG callback Notification Functions.
Cbk.h
Remark Output files generated by WDG Driver Generation Tool should not be modified
or edited manually.
17
Chapter 5 Output Files 18
Precautions Chapter 6 Chapter 6 Precautions • ECU Configuration Description File and BSWMDT File must comply with
AUTOSAR standard for R4.0.3 ECU Configuration Description File and
BSWMDT File respectively.
• The input file must contain WDG Driver, MCU Driver and DEM component
related configuration.
• Default Translation XML File (Wdg_X1x.trxml) should be present in same
location of Wdg_X1x.dll when the variant specific trxml file is not given as
input in command line.
• Default Configuration XML File (Wdg_X1x.cfgxml) must be present in same
location of Wdg_X1x.dll.
• If Translation XML File is not provided on the command line, Wdg_X1x.trxml
which is present in same location of Wdg_X1x.dll is considered as ‘default’
Translation XML File.
• If Configuration XML File is not provided on the command line,
Wdg_X1x.cfgxml which is present in same location of Wdg_X1x.dll is
considered as ‘default’ Configuration XML File.
• Translation XML File should contain the file extension ‘.trxml’.
• Configuration XML File should contain the file extension ‘.cfgxml’.
• All the function names and the string values configured should follow C
syntax for variables. It can only contain alphanumeric characters and “_”. It
should start with an alphabet.
• If the output files generated by WDG Driver Generation Tool are modified
externally, then they may not produce the expected results or may lead to
error/warning/Information messages.
• Short Name for a container should be unique within a name space.
• C Source and C Header files will be generated by the Watchdog Driver
Generation Tool based on the configuration of the parameters ‘VENDOR-
ID’ and ‘VENDOR-API-INFIX’ in the WDG Driver specific BSWMDT File.
• An error free ECU Configuration Description File generated from
configuration editor has to be provided as input to the WDG Driver
Generation Tool. Otherwise Tool may not produce the expected results or
may lead to errors/warnings/information.
• User has to make sure that the respective device specific configuration file
is used, otherwise Tool may not produce the expected results or may lead
to errors/warnings/information messages.
• The description file should always be generated using AUTOSAR specified
configuration editor and it should not be edited manually.
Remark Please refer the WDG Component User Manual for deviations from AUTOSAR
specifications, if any.
19
Chapter 6 Precautions 20
User Configuration Validation Chapter 7 Chapter 7 User Configuration Validation This section provides help to analyze the error, warning and information
messages displayed during the execution of WDG Driver Generation Tool. It
ensures conformance of input files 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 validation, refer Chapter 8 “
Messages”.
The Generation Tool displays errors or warning or information when the user
has configured incorrect inputs. The format of Error/Warning/Information
message is as shown below.
• ERR/WRN/INF<mid><xxx>: <Error/Warning/Information Message>.
where,
<mid>: 102 - WDG Driver Module Id (102) for user configuration checks.
000 - for command line checks.
<xxx>: 001-999 - Message Id.
• File Name: Name of the file in which the error has occurred.
• Path: Absolute Path of the container in which the parameter is present.
‘File Name’ and ‘Path’ need not be present for all Error/Warning/Information
messages.
21
Chapter 7 User Configuration Validation 22
Messages Chapter 8 Chapter 8 Messages The messages help to identify the syntax or semantic errors in the ECU
Configuration Description File. Hence it ensures validity and correctness of the
information available in the ECU Configuration Description File.
The following section gives the list of error, warning and information messages
displayed by the Generation Tool.
8.1 Error Messages ERR102001: Number of fields is not same for the entity 'Structure Name'. This error occurs, if the number of fields is not same in the structure that is to
be generated in the output file.
ERR102002: Field 'Field Name' is empty in the entity 'Structure Name'. This error occurs, if the structure fields that are to be generated in the output
file are empty.
ERR102003: 'WDG Driver' Component is not present in the input file(s). This error occurs, if WDG Driver Component is not present in the input ECU
Configuration Description File(s).
ERR102004: The parameter 'parameter name' in the container 'container
name' should be configured. This error occurs, if any of the mandatory configuration parameter(s)
mentioned below is (are) not configured in ECU Configuration Description File.
The list of mandatory parameters with respect to container is listed below:
Table 8-1 Parameters and Container related to error ERR102004 Parameter Name Container Name WdgDevErrorDetect
WdgDisableAllowed
WdgIndex
WdgVersionInfoApi
WdgGeneral
WdgVaryingActivationCodeMode
WdgTriggerLocation
WdgDeviceName
WdgInitialTimeout
WdgRunArea
23
Chapter 8 Messages Parameter Name Container Name WdgMaxTimeout
WdgCriticalSectionProtection
WdgVersionCheckExternalModules
WdgClockRef
WdgWriteVerify
WdgUseWriteVerifyErrorInterface
WdgInterruptConsistencyCheck
WdgTriggerMode
WdgPublishedInformation
WdgClkSettingsFast
WdgSettingsFast
WdgClkSettingsSlow
WdgSettingsSlow
-
WdgSettingsOff
WdgDefaultMode
WdgSettingsConfig
ERR102005: The reference path <path> provided for the parameter ‘Parameter Name’ within the container ‘Container Name’ is incorrect. This error occurs, if path provided for the reference parameters mentioned in
the below table are incorrect:
Table 8-2 Parameters and Container related to error ERR102005 Parameter Name Container Name WdgClockRef
WdgGeneral
WDG_E_DISABLE_REJECTED
WdgDemEventParameterRefs
WDG_E_MODE_FAILED
WDG_E_REG_WRITE_VERIFY
WDG_E_INT_INCONSISTENT
ERR102006: The value configured for the parameter ‘WdgClkSettingsFast’ in the container ‘WdgSettingsFast’ and value of
the parameter ‘WdgClkSettingsSlow’ in the container ‘WdgSettingsSlow’
are same. This error occurs, if the value configured for the parameter
WdgClkSettingsFast in the container WdgSettingsFast and value of the
parameter WdgClkSettingsSlow in the container WdgSettingsSlow are same.
ERR102007: The value configured for the parameter ‘WdgClkSettingsSlow’ in the container ‘WdgSettingsSlow’ is faster
(valid configuration should be WdgClkSettingsSlow > WdgSettingsFast)
than the value of the parameter ‘WdgClkSettingsFast’ in the container ‘WdgSettingsFast’. This error occurs, if the value configured for the parameter
WdgClkSettingsSlow in the container WdgSettingsSlow is faster than the
value of the parameter WdgClkSettingsFast in the container
WdgSettingsFast.
ERR102008: The value of the parameter ‘WdgInitialTimeout’ is greater
than the value of the parameter ‘WdgMaxTimeout’. 24
Messages Chapter 8 This error occurs, if the value of the parameter WdgInitialTimeout is greater
than the value of the parameter WdgMaxTimeout.
ERR102010: The total instances of ‘WdgSettingsConfig’ container per WDTA instance is more than <1>. This error occurs, if the total instance of WdgSettingsConfig container per
WDTA instance is more than 1.
ERR102011: The macro definition <Macro name> is not found in <Translation Header File name> translation C Header File. The macro
label format should be 'Macro format'. This error occurs, if the macro definitions “RENESAS_ICWDTA<WDG
instance>NMI_IMR” and “RENESAS_ICWDTA<WDG instance>_IMR” are not
present in Translation Header File.
ERR102012: "DriverA" WDG instance is not present in input BSWMDT
File. "VENDOR-API-INFIX" tag in WDG specific BSWMDT File should
contain DriverA". This error occurs, if “DriverA” WDG instance is not present in BSWMDT file.
ERR102014: The reference to BSWMDT file 'MODULE-DESCRIPTION-
REF' should not refer to the same 'VendorApiInfix' for two different WDG
drivers. 'VendorApiInfix' should be unique for each hardware driver.
This error occurs, if the value of ‘VendorApiInfix’ is not unique for each
hardware driver.
ERR102015: The value configured for the parameter 'WdgIndex' is same
for all the configured WDG drivers. The value of WdgIndex should be
unique for each hardware driver. This error occurs, if the value configured for the parameter WdgIndex is same
for all the configured WDG drivers.
ERR102016: The short name of the container ‘WdgSettingsConfig’ should be unique across the Drivers. This error occurs, if the short name of WdgSettingsConfig container is not
same across the Drivers.
ERR102018: The minimum and maximum values for slow_time_value
should be 0 and 196.608.
This error will occur, if the slow_time_value is less than 0 or exceeds 196.608.
ERR102019: The minimum and maximum values for fast_time_value
should be 0 and 196.608.
This error will occur, if the fast_time_value is less than 0 or exceeds 196.608.
ERR102020: The parameter 'WDG_E_REG_WRITE_VERIFY' in the 25
Chapter 8 Messages container ' WdgDemEventParameterRefs’ should be configured since
parameter 'WdgWriteVerify'in container 'WdgGeneral' is not configured
as 'WV_DISABLE'. This error will occur, if parameter 'WDG_E_REG_WRITE_VERIFY' is not
configured while parameter 'WdgWriteVerify' is configured other than
'WV_DISABLE'.
ERR102021: WdgWriteVerifyErrorInterface parameter should have a
value when the parameter WdgUseWriteVerifyErrorInterface is
configured as true. This error will occur, if WdgUseWriteVerifyErrorInterface is configured as true
and WdgWriteVerifyErrorInterface parameter is set as NULL.
ERR102022: The parameter 'WDG_E_INT_INCONSISTENT' in the
container ' WdgDemEventParameterRefs’ should be configured since
the parameter 'WdgInterruptConsistencyCheck' in container 'WdgGeneral' is configured as true. This error will occur, if the parameter 'WDG_E_INT_INCONSISTENT' is not
configured while parameter 'WdgInterruptConsistencyCheck' in container
'WdgGeneral' is configured as true.
8.2 Warning Messages WRN102001: The value of the parameter 'WdgInitialTimeout' is
configured as <0> and 'WdgDefaultMode' is not configured as <WDGIF_OFF_MODE>. Hence, Watchdog hardware will be enabled
directly after Wdg Module initialization and WDG counter will expire
after <calculated_value in msec>. This warning occurs, if WdgInitialTimeout parameter is configured as 0 and
WdgDefaultMode is not configured as WDGIF_OFF_MODE.
WRN102002: The window open period when a WDTA trigger is
valid is not set to 25%.
This warning occurs if the generated value for WDG Mode register has Window
open period set other than 25%.
8.3 Information Messages INF102001: The duration of 75% of one WDG trigger cycle for slow mode
is <slow_time_value msec>. This information occurs to provide 75% interrupt time for slow mode. In this
information message ‘slow_time_value’ will be evaluated as follows:
slow_value = Power factor from WdgClkSettingsSlow
slow_time_value = ((0.75 * (2 ** $slow_value / $clock)) * 1000)
26
Messages Chapter 8 INF102002: The duration of 75% of one WDG trigger cycle for fast mode
is <fast_time_value msec>. This information occurs to provide 75% interrupt time for fast mode. In this
information message ‘fast_time_value’ will be evaluated as follows:
fast_value = Power factor from WdgClkSettings
Fast fast_time_value = ((0.75 * (2 ** $fast_value / $clock)) * 1000)
INF102003: WdgUseWriteVerifyErrorInterface functionality has no effect
when WdgWriteVerify parameter is DISABLED. This information occurs if WdgWriteVerify parameter is DISABLED and
WdgUseWriteVerifyErrorInterface is configured TRUE.
INF102004: Reference path is not provided for the parameter <dem
parameter> and hence error shall not be reported.
This information occurs if either of WDG_E_DISABLE_REJECTED
or WDG_E_MODE_FAILED parameter is not provided reference path.
27
Chapter 8 Messages 28
Notes Chapter 9 Chapter 9 Notes “Generation Tool” and “Tool” terminologies are used interchangeably to refer
WDG Driver Generation Tool.
29
Chapter 9 Notes 30
Revision History
Sl.No. Description Version Date 1.
Initial Version
1.0.0
18-Oct-2013
2.
Following changes are made:
1.0.1
26-Sep-2014
1. Chapter 2 is updated for addition of PDF reference.
2. WdgRegReadBackEnable parameter is added in ERR102004 error
message table.
3. A note is added for ERR102012 error message.
4. WdgDemEventParameterRefs container and its parameters are added in
the table of error message ERR102005.
5. Error message ERR102017 is added newly.
6. Error messages ERR102015 and ERR102016 are rephrased.
7. Chapter 6 Precautions is updated.
3.
Following change is made:
1.0.2
28-Apr-2015
1. Updated Chapter 2 to add PDF reference.
4.
Following change is made:
1.0.3
29-Mar-2016
1.Updated Chapter 8.1 to add error messages ERR102018 and
ERR102019
2. Added R-Number.
5.
Following changes are made:
1.0.4
13-Jul-2016
1. Chapters 1,3 and 5 are updated to add new output file
Wdg_59_DriverA_Cbk.h
2. Updated Chapter 8.1, error message ERR102005 for new Dem
parameters and removed ERR102009.
3. ERR102004 is updated to add new parameters under container
WdgGeneral.
4. ERR102012 error message is updated, ERR102017 is deleted as
READBACK feature is no longer supported.
5. Added new error IDs ERR102020, ERR102021 and ERR102022.
6. Chapter 8.3 is updated to add information messages INF102003 and
INF102004.
7. Updated Chapter 2 to add PDF version.
6.
Following changes are made:
1.0.5
21-Oct-2016
1. Section 8.2 is updated to add new warning message WRN102002.
2. Table headers adder for Table 8.1 and Table 8.2
7
Following changes are made:
1.0.6
15-Feb-2017
1. Abbreviation list is updated.
2.Chapter 3 and 9 are updated with R-Numbered Tool
User manual name.
3. Version of R-number is updated at the end of document.
4. Notice and copyright information is updated.
5. R403_WDG_P1M_04_05_10_to_15_18_to_23.arxml version is updated.
31
AUTOSAR MCAL R4.0.3 User's Manual WDG Driver Component Ver.1.0.6 Generation Tool User's Manual Publication Date: Rev.1.01, February 15, 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
R20UT3729EJ0101
Document Outline
7 - R20UT3754EJ0101-AUTOSAR
RUCG Tool User's Manual9 - R20UT3754EJ0101-AUTOSARs


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

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