This is the multi-page printable view of this section. Click here to print.
Watchdog Driver
1 - R20UT3661EJ0100-AUTOSAR
2 - R20UT3661EJ0100-AUTOSAR_ind
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
Page 26
Page 27
Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Page 41
Page 42
Page 43
Page 44
Page 45
Page 46
Page 47
Page 48
Page 49
Page 50
Page 51
Page 52
Page 53
Page 54
Page 55
Page 56
3 - R20UT3661EJ0100-AUTOSARs



AUTOSAR MCAL R4.0.3
User's Manual
WDG Driver Component Ver.1.0.2
Embedded User’s Manual
Target Device:
RH850/P1x-C
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev1.00 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
ANSI
American National Standards Institute
API
Application Programming Interface
AUTOSAR
AUTomotive Open System ARchitecture
DEM/Dem
Diagnostic Event Manager
DET/Det
Development Error Tracer
DIO
Digital Input Output
ECU
Electronic Control Unit
Id
Identifier
ISR
Interrupt Service Routine
MCAL
Microcontroller Abstraction Layer
MCU
MicroController Unit
PWM
Pulse Width Modulation
RAM
Random Access Memory
ROM
Read Only Memory
SPI
Serial Peripheral Interface
WDG/Wdg
WatchDog
WDT
WatchDog Timer
WDGIF
WatchDog Interface
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
5
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 ...................................................................................................................... 19
4.3
Data Consistency ................................................................................................................ 20
4.4
WDG State Diagram ............................................................................................................ 22
4.5
WDTA 75% ISR Usage Details ........................................................................................... 23
4.6
Deviation List ...................................................................................................................... 25
4.7
User mode and supervisor mode ...................................................................................... 26
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 .............................................................................. 40
10.3
Function Definitions ........................................................................................................... 40
Chapter 11 Development And Production Errors ............................. 41
11.1
WDG Driver Component Development Errors ............................................................... 41
11.2
WDG Driver Component Production Errors ..................................................................... 42
Chapter 12 Memory Organization ...................................................... 43
Chapter 13 P1x-C Specific Information ............................................. 45
7
13.1
Sample Application............................................................................................................. 45
13.1.1
Sample Application Structure ............................................................................... 45
13.1.2
Building Sample Application ................................................................................. 46
13.1.2.1
Configuration Example ..................................................................... 46
13.1.2.2
Debugging the Sample Application .................................................. 47
13.2
Memory And Throughput ................................................................................................... 48
13.2.1
ROM/RAM Usage ................................................................................................ 48
13.2.2
Stack Depth .......................................................................................................... 49
13.2.3
Throughput Details ............................................................................................... 49
13.2.4
Precautions .......................................................................................................... 49
Chapter 14 Release Details ................................................................ 51
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
WDG behavior during Data exchange with hardware ........................................... 22
Figure 4-2
State Diagram of WDG when WdgDisableAllowed is true ................................... 22
Figure 4-3
State Diagram of WDG when WdgDisableAllowed is false .................................. 23
Figure 4-4
WDG behavior when Wdg_SetTriggerCondition is called ................................... 24
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 .............................................. 43
Figure 13-1
Overview Of WDG Driver Sample Application ..................................................... 45
List of Tables
Table 4-1
WDG Driver Protected Resources List ................................................................ 21
Table 4-2
WDG Driver Deviation List ................................................................................... 25
Table 4-3
Supervisor mode and User mode details ............................................................. 26
Table 6-1
Register Details .................................................................................................... 29
Table 8-1
Description Of The WDG Driver Component Files .............................................. 34
Table 10-1
APIs Used in WDG module .................................................................................. 40
Table 11-1
DET Errors Of WDG Driver Component .............................................................. 41
Table 11-2
DEM Errors Of WDG Driver Component ............................................................. 42
Table 13-1
ROM/RAM Details without DET ........................................................................... 48
Table 13-2
ROM/RAM Details with DET ............................................................................... 48
Table 13-3
Throughput Details of the APIs ............................................................................ 49
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-C microcontrollers.
This document shall be used as reference by the users of WDG Driver
Component. The system overview of complete AUTOSAR architecture is
shown in the below Figure:
Application Layer
AUTOSAR RTE
System Services
On board Device Abstraction
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_Hardware.c, Wdg_59_DriverA_Cfg.h and
Wdg_Hardware.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
i
n
e
i
te
Wa
x
n
te
t
r
e
n
S
GP
M
tc
r
r
a
P
Fl
n
n
l
C
R
CU
h
a
a
I
PWM
C
H
L
e
A
P
I
D
E
CU
o
A
T
l
l
d
EP
a
I
A
x
DC
O
I
N
r
R
O
M
o
e
F
F
R
n
N
D
Dr
g
l
l
ay
a
a
d
Dr
Dr
D
T
r
Te
T
R
D
i
s
s
le
D
Dr
v
iv
r
D
D
e
h
h
O
iv
r
r
D
iv
ri
i
er
i
iv
v
er
s
st
r
M
D
er
v
r
t
i
Dr
Dr
ri
er
v
er
i
er
v
r
er
er
v
v
i
er
e
iv
i
Dr
v
er
v
e
r
er
e
i
r
r
v
er
E
F
E
P
L
E
L
D
GP
W
Cl
x
A
o
M
S
I
t.
A
P
SPI
N
CA
IC
P
w
C
DC
I
D
;o
CU
Micro
B
S
RO
W
O
T
e
H
I
o
U
T
ck
US
N
r
r
M
&
Controller
M
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 and Support For Different Interrupt
Categories.
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 (P1x-C Specific
This section provides the P1x-C 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
Specification of WDG Driver (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.
RH850/P1H-C Document User’s Manual: Hardware
1.00
(r01uh0517ej0100_rh850p1x-c_Open.pdf)
4.
Specification of Compiler Abstraction
3.2.0
(AUTOSAR_SWS_CompilerAbstraction.pdf)
5.
Specification of Memory Mapping
1.4.0
(AUTOSAR_SWS_MemoryMapping.pdf)
6.
Specification of Platform Types
2.5.0
(AUTOSAR_SWS_PlatformTypes.pdf)
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 “R20UT3662EJ0100-
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_Types.h
\Wdg_59_DriverA_Version.h
\Wdg_59_DriverA_RegWrite.h
X1X\ P1x-C \modules\wdg\sample_application\<SubVariant>\make\ghs
App_Wdg_P1x-C_Sample.mak
X1X\ P1x-C \modules\wdg\sample_application\<SubVariant>\make\ghs
App_Wdg_P1x-C_Sample.ld
X1X\ P1x-C \modules\wdg\sample_application\<SubVariant>\obj
17
Chapter 3 Integration And Build Process
X1X \P1x-C \modules\wdg\generator
\R403_WDG_P1x-C_BSWMDT.arxml
X1X\P1x-C\modules\wdg\user_manual
(User manuals will be available in this folder)
Note: 1. <AUTOSAR_version> should be 4.0.3.
2. <SubVariant> can be P1H-C.
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 does not implement any Call Back Notification functions.
•
Example code mentioned in this document shall be taken only as a
reference for implementation.
•
The Watchdog hardware supports two instances. Hence, WDG Driver
Component is implemented as two separate drivers Driver A and Driver B.
The difference between these drivers are in the value of the parameter
‘VendorApiInfix’ in Parameter Definition File and the address of registers
generated in respective configuration header file.
WDG_DRIVER_INSTANCE variable of Base Make file also has to be
updated for the selected driver.
•
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 Main Oscillator 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.
•
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.
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.
19
Chapter 4 Forethoughts
•
Validation of input parameters is 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 and Wdg_59_DriverA_PBcfg.c 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.
•
When using an emulator, please be sure to set a BOOTCTRL register. In
SYNCHRONOUS debug mode it cannot be operated, because PE1 cannot
start when PE2 is remaining in STOP mode. With this combination, you
have to use the asynchronous debug mode, since only here two PEs are
independently operated. Otherwise there is a permanent Fetch- stop.
Synchronous debug shall be switched off with the command "target
syncdebug off 1
•
The user shall configure the exact Module Short Name Wdg in configurations
as specified in config.xml file and the same shall be given in command line
4.3 Data Consistency
To support the re-entrance and interrupt services, the 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 WDG_59_DRIVERA_ENTER_CRITICAL_SECTION
and WDG_59_DRIVERA_EXIT_CRITICAL_SECTION functions. The
WDG_59_DRIVERA_ENTER_CRITICAL_SECTION function is called
before the data needs to be protected and
WDG_59_DRIVERA_EXIT_CRITICAL_SECTION 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:
WDG_59_DRIVERA_TRIGG_PROTECTION
WDG_59_DRIVERA_MODE_SWITCH_PROTECTION
The protection areas WDG_59_DRIVERA_TRIGG_PROTECTION and
WDG_59_DRIVERA_MODE_SWITCH_PROTECTION are used to protect
the WDG triggering and WDG mode switching respectively.
The functions WDG_59_DRIVERA_ENTER_CRITICAL_and
WDG_59_DRIVERA_EXIT_CRITICAL_SECTION can be disabled by
disabling the configuration parameter ‘WdgCriticalSectionProtection’.
Note: The above sequence is followed for DriverB also.
20
Forethoughts
Chapter 4
Table 4-1
WDG Driver Protected Resources List
API Name
Exclusive Area Type
Protected Resources
Wdg_59_DriverA_Init
WDG_59_DRIVERA_M
Registers:
ODE_SWITCH_PROTE
IMR0, EIC8
CTION
WDTAAMD
WDG_59_DRIVERA_T
Registers:
RIGG_PROTECTION
WDTAAWDTE
WDTAAREF
WDTAAEVAC
Wdg_59_DriverA_SetMode
WDG_59_DRIVERA_M
Registers:
ODE_SWITCH_PROTE
WDTAAMD
CTION
Global Data:
Wdg_59_DriverA_GddCurrentMo
de
WDG_59_DRIVERA_T
Global Data:
RIGG_PROTECTION
Wdg_59_DriverA_GpConfigPtr
Wdg_59_DriverA_GusTiggerCount
er
Registers:
WDTAAWDTE
WDTAAREF
WDTAAEVAC
Wdg_59_DriverA_SetTrigg
WDG_59_DRIVERA_T
Global Data:
erCondition
RIGG_PROTECTION
Wdg_59_DriverA_GpConfigPtr
Wdg_59_DriverA_GusTiggerCoun
ter
Wdg_59_DriverA_GetVersi
-
-
onInfo
Note1: The above is followed for DriverB also.
Note2: The highest measured duration of a critical section is 1.2micro seconds measured for
Wdg_59_DriverA_SetMode API
21



Chapter 4 Forethoughts
Maximum Counter value FFFFH
75% of maximum
counter va lue
Counter Value
Reset Release
Wdg_Init( )
75% of Time Period
Wdg_SetTriggerCondition( )
Wdg_SetTriggerCondition( )
INTWDTn(75% Interrupt)
WDG Trigger
A
WDTAnTRES
Figure 4-1
WDG behavior during Data exchange with hardware
4.4 WDG State Diagram
The State diagram of WDG Driver is as shown below
No Initialization
Wdg_Init( ) with
Wdg_Init( ) with
WDGIF_OFF_MODE
WDGIF_SLOW_MODE
Wdg_Init( ) with
WDGIF FAST MODE
FAST
OFF
Wdg_SetMode
(W DGIF FAST MODE
SLOW
Wdg_SetMode
(WDGIF SLOW MODE)
Figure 4-2
State Diagram of WDG when WdgDisableAllowed
is true
22
Forethoughts
Chapter 4
WDG Driver supports following modes when configuration parameter
WdgDisableAllowed is true.
1. WDGIF_OFF_MODE
2. WDGIF_SLOW_MODE
3. WDGIF_FAST_MODE
No Initialization
Wdg_Init( ) with
Wdg_Init( ) with
WDGIF_S LOW_MODE
WDGIF_FAST_MODE
FAST
SLOW
Figure 4-3 State Diagram of WDG when WdgDisableAllowed is false
WDG Driver supports following modes when configuration parameter
WdgDisableAllowed is false
1. WDGIF_SLOW_MODE
2. WDGIF_FAST_MODE
Like shown in the above figures when WDG Driver is initialized by the API
Wdg_Init(), the WDG Driver gets into one of the modes based on the default
value configured during configuration. Also the modes can be changed by the
API Wdg_SetMode() only once after Wdg_Init(), if the current mode is
WDGIF_OFF_MODE.
4.5 WDTA 75% ISR Usage Details
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.
23





Chapter 4 Forethoughts
Maximum Counter value FFFFH
75% of maximum
co unte r value
C ounter Value
Reset Release
Wdg_Init ()
75 % of Time Period
Wdg_SetTrigger Condition()
INTWDTn(75% Int errup t )
WDG Trigger
A
25 % of Time Period
WDTAnTRES
Act ual Timeout Value
Figure 4-4 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_SetTriggerCondition’.
The above figure illustrates the scenario where Wdg_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 = 8MHz
For example considering current mode settings = WDTATCKI/2^16
Period = 2^16/8MHz = 0.008192 sec
Total window time = 8.192 msec
75% interrupt time = 6.144 msec
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
<6.143999 msec>
If the timeout value passed by the API Wdg_Settriggercondition is 100 msec,
then the counter value will be calculated in the WDG Driver as 16.
24
Forethoughts
Chapter 4
The duration of 75% of one WDG trigger cycle calculation for fast mode
WDTATCKI = 8MHz
For example considering current mode settings = WDTATCKI/2^9
Period = 2^9/240k = 0. 000064 sec
Total window time = 0.064 msec
75% interrupt time = 0.048 msec
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
<0.047999 msec>
If the timeout value passed by the API Wdg_Settriggercondition is 50 msec,
then the counter value will be calculated in the WDG Driver as 50.
The API Wdg_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_SetTriggerCondition execution and next
WDG trigger from 75% ISR.
4.6 Deviation List
Table 4-2
WDG Driver Deviation List
Sl. No.
Description
AUTOSAR Bugzilla
1.
"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_Init().
2.
The requirement 'WDG025' is handled in the generation
-
tool itself by the error 'ERR_102_054'.
3.
If the API Wdg_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.
4.
Renesas WDG driver doesn't follow BSW00347
-
Autosar requirement regarding naming separation of
different instances of BSW drivers.
25
Chapter 4 Forethoughts
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 Mode
Supervisor
Known limitation in
mode
User mode
-
x
Interrupt register
1
Wdg_59_DriverA_Init
IMR cannot be
accessed.
x
x
-
2
Wdg_59_DriverA_SetMode
x
x
-
3
Wdg_59_DriverA_SetTriggerCondition
x
x
-
4
Wdg_59_DriverA_GetVersionInfo
Note1: Above Sequence is followed for DriverB also.
Note2: 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.
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 invoke 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.
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
Macro/Variable
Wdg_59_DriverA_Init
IMRn
WdgErrorModeSetting WDG_59_DRIVERA_INTWDTIM
R_MASK
WDTAnMD
WdgDefaultMode
ucWdtamdDefaultValue.
Wdg_59_DriverA_SetMode
WDTAnMD
-
ucWdtamdSlowValue,
ucWdtamdFastValue
Wdg_59_DriverA_SetTriggerCon
-
-
-
dition
Wdg_59_DriverA_GetVersionInfo -
-
-
Wdg_59_DriverA_TriggerFunc
WDTAnEVAC -
WDG_59_DRIVERA_RESTART -
WDG_59_DRIVERA_WDTAREF
_ADDRESS
WDTAnWDT
-
WDG_59_DRIVERA_RESTART
E
WDTAnREF
-
-
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
•
Wdg_59_Hardware.h
The C source file generated by WDG Driver Generation Tool:
•
Wdg_59_DriverA_PBcfg.c
•
Wdg_59_Hardware.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
33
Chapter 8 WDG Driver Component Header And Source File Description
•
Dem_IntErrId.h
•
Det.h
•
SchM_Wdg_59_DriverA.h
•
SchM_Wdg_59_DriverB.h
•
WdgIf_Types.h
•
Os.h
•
Rte.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 is generated by the WDG Driver Component Code Generation Tool
for Prototype Declarations of WDG callback notification functions.
Wdg_59_Hardware.h
This file is generated by the WDG Generation Tool include definition of
hardware registers specific to P1x-C WDG.
Wdg_59_Hardware.c
This file is generated by the WDG Generation Tool which consists of Global
variable definition of hardware registers specific to P1x-C WDG.
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
This file contains the macro for the WDG Timer channels. It also 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 the macros functions for register write verify.
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.
34
WDG Driver Component Header And Source File Description Chapter 8
File
Details
Wdg_59_DriverA_Version.c
This file contains the code for checking version of all modules that are
interfaced to WDG.
Compiler_Cfg.h
This file contains the memory and pointer classes.
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.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.
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.
Note : Above provided WDG Driver Component Files are followed for DriverB also.
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 “R20UT3662EJ0100-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.
39
Chapter 10 Application Programming Interface
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.
uint8
ucWdtamdFastValue
WDTAnMD
register value for
the Fast Mode.
Uint32
usDefaultTimeValue
75% time value
of either slow or
fast mode in
milliseconds
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 Used in WDG module
SI.No
API’s
1.
Wdg_59_DriverA_Init
2.
Wdg_59_DriverA_SetMode
3.
Wdg_59_DriverA_SetTriggerCondition
4.
Wdg_59_DriverA_GetVersionInfo
40
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_POINTER
Related API(s)
Wdg_59_DriverA_Init, Wdg_59_DriverA_GetVersionInfo
Source of Error
When the API service is called with a configuration pointer as NULL_PTR.
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, Wdg_59_DriverA_SetTriggerCondition
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_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.
5
Error Code
WDG_59_DRIVERA_E_INVALID_DATABASE
Related API(s)
Wdg_59_DriverA_Init
Source of Error
When the API service Wdg_59_DriverA_Init is called with invalid database.
Sl. No.
6
Error Code
WDG_59_DRIVERA_E_PARAM_CONFIG
Related API(s)
Wdg_59_DriverA_Init
Source of Error
When the above mentioned API is invoked with NULL parameter.
Note: Above DET errors are applicable for DriverB also.
41
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_Init
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_Init
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_INT_INCONSISTENT
Related API(s)
WDG_59_DRIVERB_TRIGGERFUNCTION_ISR
Source of Error
When interrupt consistency fails the above error is reported to DEM
Sl. No.
4
Error Code
WDG_59_DRIVERA_E_REG_WRITE_VERIFY
Related API(s)
Wdg_59_DriverA_Init, Wdg_59_DriverA_SetMode
Source of Error
When register write-verify fails the above error is reported to DEM.
Note: Above DEM errors are applicable for DriverB also
42
Memory Organization
Chapter 12
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 Section
Library / Object Files
WDG Driver code related to APIs placed in
Global RAM required for WDG functioning.
Memory
X1
Segment Name:
X1
Y1
Segment Name:
WDG59_DriverA_PUBLIC_CODE_ROM
RAM_UNSPECIFIED
WDG Driver code related to internal
Global 8- bit RAM to be initialized by startup
functions are placed in this memory
Code
X2
Segment Name:
X2
Y2
Segment Name:
WDG59_DriverA_PRIVATE _CODE_ROM
RAM_8BIT
Global 8- bit RAM to be initialized by startup
Code
WDG Driver code related to ISR functions are
Glo
b
a
l
32-bit RAM to be initialized by WDG
placed in this memory
S
D e
r g
iv m
er e
. n
t Name:
X3
Y3
RAM_8BIT
Segment Name:
Segment Name:
RAM_32BIT
WDG59_DriverA_START_SEC_CODE_FAST
Tool Generated Files
The const section in the file Wdg59_A_PBcfg.c
is placed in this memory.
Segment Name:
X4
WDG59_DriverA_CFG_DBTOC_UNSPECIFIE
D
Figure 12-1 Memory Organization Of WDG Driver Component
43
Chapter 12 Memory Organization
ROM Section (X1, X2 ,X3 and X4):
WDG59_DriverA_PUBLIC_CODE_ROM (X1): WDG Driver Component
APIs, which can be located in code memory.
WDG59_DriverA_PRIVATE_CODE_ROM (X2): Internal functions of WDG
Driver Component code that can be located in code memory.
WDG59_DriverA_START_SEC_CODE_FAST(X3): Interrupt functions of WDG
Driver Component code that can be located in code memory.
WDG59_DriverA_CFG_DBTOC_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 and Y3):
RAM_UNSPECIFIED (Y1): This section consists of the global RAM pointer
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.
RAM_8BIT (Y2): This section consists of the global RAM variables of 8-bit
size that are initialized by start-up code and used internally by WDG Driver
Component and other software components. The specific sections of
respective software components will be merged into this RAM section
accordingly.
RAM_32BIT (Y3): 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.
•
X1, X2, Y1, Y2, and Y3 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.
44
P1x-C Specific Information
Chapter 13
Chapter 13
P1x-C Specific Information
P1x-C supports following devices:
R7F701370A(CPU1(PE1)), R7F701371(CPU1(PE1)),
R7F701372(CPU1(PE1)), R7F701373, R7F701374
13.1 Sample Application
13.1.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
RH850
AUTOSAR TYPES
COMPILER
TYPES
Devices
COMMON
P1x-C
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 P1x-C is available in the path
X1X\P1x-C\modules\wdg\sample_application
The Sample Application consists of the following folder structure
X1X\P1x-C\modules\wdg\definition\<AUTOSAR_version>\<SubVariant> \
R403_WDG_DriverA_P1X-C.arxml
X1X\P1x-C\modules\wdg\sample_application\<SubVariant>\
<AUTOSAR_version>
\src\WDG_59_DriverA_PBcfg.c
45
Chapter 13
P1x-C Specific Information
\include\WDG_59_DriverA_cfg.h
\config\ App_WDG_P1x-C_701370A_Sample.arxml
\config\ App_WDG_P1x-C_701371_Sample.arxml
\config\ App_WDG_P1x-C_701372_Sample.arxml
\config\ App_WDG_P1x-C_701373_Sample.arxml
\config\ App_WDG_P1x-C_701374_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.
13.1.2 Building Sample Application
13.1.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_P1x-C_701372_Sample.arxml
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, Opbyte0 value = 0x7FBFFFFF.
If Variable activation code is disabled, Opbyte0 value =
0x7F3FFFFF.
46
P1x-C Specific Information
Chapter 13
13.1.2.2
Debugging the Sample Application
GNU Make utility version 3.81 or above must be installed and available in the
path as defined by the environment user variable “GNUMAKE” to complete the
build process using the delivered sample files.
•
Open a Command window and change the current working directory to
”make” directory present as mentioned in below path:
“X1X\P1x-C\common_family\make\<Complier>”
Now execute the batch file SampleApp.bat with following parameter:
SampleApp.bat Wdg <Device_name>
•
After this, the tool output files will be generated with the configuration as
mentioned in App_WDG_P1x-C_701370A_Sample.arxml file available in
the path:
“X1X\P1x-C\modules\wdg\sample_application\<SubVariant>\
4.0.3\config\App_WDG_P1x-C_701372_Sample.arxml”
•
After this, all the object files, map file and the executable file
App_WDG_P1x-C_Sample.out will be available in the output folder
(“X1X\P1x-C\modules\wdg\sample_application\<SubVariant>\obj\”).
•
The executable can be loaded into the debugger and the sample application
can be executed.
Note: Sample App is tested with Variable activation code disabled, Opbyte
value = 0x7F3FFFFF.
Remark Executable files with ‘*.out’ extension can be downloaded into the target
hardware with the help of Green Hills debugger.
•
If any configuration changes (only post-build) are made to the ECU
Configuration Description file
“X1X\P1x-
C\modules\wdg\sample_application\<SubVariant>\4.0.3\config\App_W
DG_P1x-C_701372_Sample.arxml”
•
The database alone can be generated by using the following commands.
make –f App_WDG_P1x-C_Sample.mak generate_wdg_config
make –f App_WDG_P1x-C_Sample.mak App_WDG_P1x-C_Sample.s37
•
After this, a flashable Motorola S-Record file App_WDG_P1x-
C_Sample.s37 is available in the output folder.
Note: The <Device_name> indicates the device to be compiled, which can be
701372 and <SubVariant> can be P1H-C.
47
Chapter 13
P1x-C Specific Information
13.2 Memory And Throughput
13.2.1 ROM/RAM Usage
The details of memory usage for the typical configuration is provided in this
section.
Only 1 WDG driver instance configured
WdgDevErrorDetect: false
WdgDisableAllowed: true
WdgVersionInfoApi: true
WdgInitialTimeout: 1
WdgDefaultMode: WDGIF_SLOW_MODE
WdgClkSettingsFast: TWO_POWOF_9_DIVBY_ WDTATCKI
WdgClkSettingsSlow: TWO_POWOF_16_DIVBY_ WDTATCKI
The details of memory usage for the typical configuration is provided in the
section below.
Table 13-1
ROM/RAM Details without DET
Sl. No. ROM/RAM
Segment Name
Size in bytes
1.
ROM
DEFAULT_CODE_ROM
638
2.
RAM
RAM_UNSPECIFIED
4
RAM_32BIT
4
RAM_8BIT
1
The details of memory usage for the typical configuration, with DET enabled is
provided in the section below.
Table 13-2
ROM/RAM Details with DET
Sl. No. ROM/RAM
Segment Name
Size in bytes
1.
ROM
DEFAULT_CODE_ROM
922
2.
RAM
RAM_UNSPECIFIED
4
RAM_32BIT
4
RAM_8BIT
2
48
P1x-C Specific Information
Chapter 13
13.2.2 Stack Depth
The worst-case stack depth for WDG Driver Component is 76 bytes for the
typical configuration.
13.2.3 Throughput Details
The throughput details of the APIs for the Typical configuration is as follows:
The clock frequency used to measure the throughput is 240MHz for all
APIs.
Table 13-3
Throughput Details of the APIs
API Name
Throughput in
Remarks
Sl.
microseconds
No.
1.
Wdg_59_DriverA_Init
0.862
Timing is measured with default
mode as
WDGIF_SLOW_MODE
2.
Wdg_59_DriverA_SetMode
0.287
Timing is measured with
passing parameter
WDGIF_SLOW_MODE
3.
Wdg_59_DriverA_SetTriggerCon 0.325
-
dition
4.
Wdg_59_DriverA_GetVersionInfo 0.620
-
5.
WDG_59_DRIVERA_TRIGGERF 0.425
-
UNCTION_ISR
13.2.4 Precautions
If the critical section is disabled, there could be possibility that API is called
concurrently and executed based on task priority in which it is called.Because
the data inconsistency described above may happen, Critical Section Protection
is required to avoid this mal-functioning.
49
Chapter 13 P1x-C Specific Information
50
Release Details
Chapter 14
Chapter 14 Release Details
WDG Driver Software
Version: 1.0.2
51
Chapter 14 Release Details
52
Revision History
Sl.No
Description
Version
Date
1.
Initial Version
1.0.0
10-Aug-2015
2.
The following changes are made:
1.0.1
23-Feb-2016
1. Deviation list updated for requirement BSW00347.
2. Updated section 4.1 General.
3. R-number added to the document.
4. Added DET error for
Wdg_59_DriverA_GetVersionInfo in Chapter 11.
5. Section 13.3 Memory and Throughput updated.
6. Updated section 4.2 Preconditions.
3.
1. The following changes are made:
1.0.2
27-Feb-2017
2. Section 13.2.4 Precautions is added.
3. Chapter 8 stub C header file is replaced with The port
specific C header files and added the stub files
4. Added a ‘Note’ and updated the table 'Supervisor
mode And User mode’ details.
5. Section 13.2.1, naming convention of
WdgClkSettingsFast and WdgClkSettingsSlow
values are changed.
6. Section 13.2 Memory and Throughput updated.
7. R-number updated for the document.
8. Device name updated.
9. Section 13.1 Compiler, Linker and Assembler
removed.
10. Updated Section 4.3 for Critical section details and
added table WDG Driver Protected Resources List.
11. Reference for .one and .html are removed.
12. In Section 4.7 updated Note to Note2 and added
Note1
13. Added new errors in Table 11-2 DEM Errors Of WDG
Driver Component and added Notes to Table 11-2
and Table 11-1.
14. Updated Section 8 with a Note.
15. Updated Content of Section 13.2.4
53
AUTOSAR MCAL R4.0.3 User's Manual
WDG Driver Component Ver. 1.0.2
Embedded User’s Manual
Publication Date: Rev1.00, February 27, 2017
Published by: Renesas Electronics Corporation

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


AUTOSAR MCAL R4.0.3
User’s Manual
R20UT3661EJ0100
Document Outline
- Chapter 1 Introduction
- Chapter 2 Reference Documents
- Chapter 3 Integration And Build Process
- Chapter 4 Forethoughts
- Chapter 5 Architecture Details
- Chapter 6 Registers Details
- Chapter 7 Interaction Between The User And WDG Driver Component
- Chapter 8 WDG Driver Component Header And Source File Description
- Chapter 9 Generation Tool Guide
- Chapter 10 Application Programming Interface
- Chapter 11 Development And Production Errors
- Chapter 12 Memory Organization
- Chapter 13 P1x-C Specific Information
- Chapter 14 Release Details
4 - R20UT3662EJ0100-AUTOSAR
5 - R20UT3662EJ0100-AUTOSAR_ind
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
Page 26
Page 27
Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
6 - R20UT3662EJ0100-AUTOSARs



AUTOSAR MCAL R4.0.3
User’s Manual
WDG Driver Component Ver.1.0.2
Generation Tool User’s Manual
Target Device:
RH850/P1x-C
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev1.00 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
DEM
Diagnostic Event Manager
ECU
Electronic Control Unit
ID/Id
Identifier
MCAL
MicroController Abstraction Layer
MCU
MicroController Unit
WDG/Wdg
Watchdog Driver
WDTA
Window Watchdog Timer A
XML
eXtensible Mark-up Language
Definitions
Terminology
Description
BSWMDT File
This file is the template for the Basic Software Module Description.
Configuration XML File
This file contains the setting of command line options.
ECU Configuration Description
Input file to WDG Driver MCAL Code Generator Tool. It is
File
generated by ECU Configuration Editor.
Sl.No
Serial Number.
5
6
Table of Contents
Chapter 1 Introduction .......................................................................................... 9
1.1.
Document Overview .......................................................................................................... 9
Chapter 2 Reference ........................................................................................... 11
2.1.
Reference Documents .................................................................................................... 11
2.2.
Trademark Notice ............................................................................................................ 11
Chapter 3 Code Generation Overview ............................................................... 13
Chapter 4 Input Files ........................................................................................... 15
Chapter 5 Output Files ........................................................................................ 17
Chapter 6 Precautions ........................................................................................ 19
Chapter 7 User Configuration Validation ........................................................... 21
Chapter 8 Configuration Overview .................................................................... 23
8.1.
Container Overview ......................................................................................................... 23
8.1.1. Pre-Compile Configurable Parameters ................................................................ 23
8.1.2. Post Build Time Configurable Parameters ........................................................... 25
Chapter 9 Messages ............................................................................................ 27
9.1
Error Messages ................................................................................................................ 27
9.2
Warning Messages .......................................................................................................... 30
9.3
Information Messages .................................................................................................... 30
7
List of Figures
Figure 3-1
Overview of Code Generation .............................................................................................. 13
Figure 3-2 Flow-Diagram of Code Generation ...................................................................................... 14
Figure 8-1
Configuration overview ........................................................................................................ 23
List of Tables
Table 5-1
Output Files Description ......................................................................................................... 17
Table 8-1 Pre-Compile Configurable Parameters ........................................................................................... 23
Table 8-2 Post Build Time Configurable Parameters ...................................................................................... 25
8
Introduction Chapter1
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 MCAL Code Generator Tool to achieve scalability and
configurability.
The document describes the WDG module specific inputs and outputs of
the MCAL Code Generator Tool that is the common code generator engine
used for the generation of the configuration code for all MCAL modules.
MCAL Code Generator Tool is a command line tool that extracts
information from ECU Configuration Description File and BSWMDT File and
generates WDG Driver C Source and C Header files such as
Wdg_59_Driver<A/B>_PBcfg.c, Wdg_Hardware.c,
Wdg_59_Driver<A/B>_Cfg.h, Wdg_59_Driver<A/B>_Cbk .h and
Wdg_Hardware.h.
Remark: Based on the value for the parameter ‘VendorApiInfix’, MCAL Code
Generator Tool generates either Wdg_59_DriverA_Cfg.h, Wdg_59_DriverA_PBcfg.c
files and Wdg_59_DriverA_Cbk or Wdg_59_DriverB_Cfg.h, Wdg_59_DriverB_PBcfg.c
and
Wdg_59_DriverB_Cbk
files.
Hence
in
this
document
‘Wdg_59_Driver<A/B>_Cfg.h,
Wdg_59
_Driver<A/B>_PBcfg.c
and
Wdg_59_Driver<A/B>_Cbk.h’ term is 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 (Code Generation
Provides MCAL Code Generator Tool Overview.
Overview)
Section 4 (Input Files)
Provides information about ECU Configuration Description File.
Section 5 (Output Files)
Explains the output files that are generated by the MCAL Code
Generator Tool.
Section 6 (Precautions)
Contains precautions to be taken during configuration of ECU
Configuration Description File.
Section 7 (User Configuration
Describes about user configuration validation done by the MCAL Code
Validation)
Generator Tool.
Section 8 (Configuration
Overview)
Provides Container Overview.
Describes all the Error/Warning/Information messages of R4.0.3 which
Section 9 (Messages)
helps the user to understand the probable reason for the same.
9
Chapter1 Introduction
10
Reference Chapter 2
Chapter 2 Reference
2.1.
Reference Documents
The following table lists the documents referred to develop this document:
Sl. No Title
Version
1.
AUTOSAR_SWS_WDGDriver
2.5.0
2.
MCAL_CodeGenerator_Tool_UserManual.pdf
1.0.7
3.
R20UT3828EJ0100-AUTOSAR.pdf
1.0.2
2.2. Trademark Notice
Microsoft and Windows are trademarks/registered trademarks of Microsoft
Corporation.
11
Chapter2 Reference
12
Code Generation Overview Chapter 3
Chapter 3 Code Generation Overview
MCAL Code Generator Tool overview is shown below.
ECU Configuration
Wdg_59_Driver<A/B>_C
Description File
fg.h,
and BSWMDT File
Wdg_59_Driver<A/B>_C
MCAL
bk.h,
Generator
Velocity template
Wdg_59_Hardware.h,
files for WDG
Wdg_59_Driver<A/B>_P
Bcfg.c,
Wdg_59_Hardware.c
Configuration XML
File
Figure 3-1 Overview of Code Generation
ECU Configuration Description File (.arxml):
This file will contain WDG Driver specific configuration information.
This file should be generated by AUTOSAR specified Configuration
Editor.
BSWMDT File (.arxml):
MCAL Code Generator Tool uses “Common Published Information”
from WDG module specific BSWMDT File. WDG module specific
BSWMDT File should not be updated manually since it is “Static
Configuration” file.
Velocity template files:
Wdg_PBcfg_c.vm, Wdg_Cfg_h.vm, Wdg_Cbk_h.vm,
Wdg_Hardware_h.vm, Wdg_Hardware_c.vm, Wdg_Validate.vm,
commonhelper.vm. They are interpreted by the MCAL Generator
MCAL Code Generator Tool in order to provide user input validation
and generate the final output file needed by the AUTOSAR
configuration chain .They are the "logic" of the Code Generator.
Configuration XML File (.xml):
This file is used to specify which velocity template to use and their
location and the name of the output file generated.
For the error free input file, the MCAL Code Generator Tool generates the
following output files: Wdg_59_Driver<A/B>_Cfg.h,
Wdg_59_Driver<A/B>_Cbk.h, Wdg_59_Driver<A/B>_PBcfg.c,
Wdg_Hardware.h and Wdg_Hardware.c and displays appropriate context
sensitive error messages for wrong input and exits.
ECU Configuration Description File can be created or edited using ECU
Configuration Editor.
13
Chapter3 Code Generation Overview
Concept of execution for MCAL Code Generator Tool is as follows:
Generation start
Common
Validate.vm
Helper.vm
config.xml
ECU Configuration
Description Files
MCAL Code Generator
Template files (.vm)
And BSWMDT file
Tool
(.arxml)
No
Yes
Validation
successful
Display Error
Generate Output Files
Generation stop
Figure 3-2 Flow-Diagram of Code Generation
The module “Validate” will validate the configuration (contents of ECU Configuration
Description File(s) as input). If there are incorrect values or incorrect dependencies, the
MCAL Code Generator Tool will display error, warning and information messages. In
case of errors, the MCAL Code Generator Tool will abort the execution.
Wdg_Cfg_h.vm / Wdg_PBcfg_c.vm will generate compiler switch / structures necessary
to the AUTOSAR Configuration chain and vendor specific parameters.
Wdg_Hardware_h.vm / Wdg_Hardware_c.vm will generate hardware related info
(defines number of actual instances / channels used / structure to access to the I/O
mapped peripheral).
Remark Please consult the general MCAL Code Generator Tool User Manual
(MCAL_CodeGenerator_Tool_UserManual.pdf) and
GettingStarted_MCAL_Drivers_X1x (R20UT3828EJ0100-AUTOSAR.pdf)
for details about the tool command line options.
14
Input Files Chapter 4
Chapter 4 Input Files
MCAL Code Generator Tool will accept the config.xml file which has paths to the
code generator template files for generating WDG Driver files. MCAL Code
Generator Tool needs ECU Configuration Description File(s), BSWMDT File and
WDG configuration XML File as input to generate WDG Driver specific source
files. MCAL Code Generator Tool needs information about WDG Driver module.
Hence WDG Configuration Description File should contain configuration of WDG
Driver module. MCAL Code Generator Tool ignores any other AUTOSAR
component configured in the ECU Configuration Description File. ECU
Configuration Description File can be generated using configuration editor.
ECU Configuration Description File must comply with AUTOSAR standard
ECU Configuration Description File format.
Remark The detailed explanation about the parameters and containers are found in
Parameter Definition File.
15
Chapter 4 Input Files
16
Output Files Chapter 5
Chapter 5 Output Files
MCAL Code Generator Tool generates configuration details in C Header and
C
Source
files Wdg_59_Driver<A/B>_Cfg.h,
Wdg_59_Driver<A/B>_Cbk.h,
Wdg_59_Driver<A/B>_PBcfg.c Wdg_59_Hardware.c and Wdg_59_Hardware.h.
The content of each output file is given in the table below:
Table 5-1 Output Files Description
Output File
Details
Wdg_59_Driver<A/B>_Cfg.h
This file contains pre-compile time parameters.
Wdg_59_Driver<A/B>_Cbk.h
This file contains function prototype of call back functions
Wdg_59_Driver<A/B>_PBcfg.c This file contains post-build configuration data.
Wdg_59_Hardware.c
This file contains hardware information.
Wdg_59_Hardware.h
This file contains hardware information.
Remark Output files generated by MCAL Code Generator Tool should not be modified or
edited manually.
17
Chapter 5 Output Files
18
Precautions Chapter 6
Chapter 6 Precautions
• ECU Configuration Description File and BSWMDT File must comply with
AUTOSAR standard for R4.0.3 ECU Configuration Description File and
BSWMDT File respectively.
• ECU Configuration Description File must contain WDG, MCU and DEM module
description files.
• The input file must contain WDG Driver module.
• All the function names and the string values configured should follow C syntax
for variables. It can only contain alphanumeric characters and “_”. It should start
with an alphabet.
• config.xml file should convey the velocity template file location and output file
location.
• Configuration XML File should contain the file extension ‘.xml’.
• If the output files generated by MCAL Code Generator Tool are modified
externally, then they may not produce the expected results or may lead to
error/warning/Information messages.
• Short Name for a container should be unique within a name space.
• An error free ECU Configuration Description File generated from configuration
editor has to be provided as input to the MCAL Code Generator Tool. Otherwise
MCAL Code Generator 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 (R20UT3661EJ0100-
AUTOSAR.pdf) for deviations from AUTOSAR.
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 Driver MCAL Code Generator Tool.
It ensures conformance of input file with syntax and semantics. It also performs
validation on the input file for correctness of the data.
For more details on list of Error/Warning/Information messages that are
displayed as a result of input file(s) validation, refer Chapter 9 “Messages”.
The MCAL Code Generator Tool displays error or warning or information when
the user has configured incorrect inputs. The format of
Error/Warning/Information message is as shown below.
<message_type>_<vendor_id>_<module_id>_<message_id>:<message_content>.
where,
<message_type> : ERR/WARNING/INFO
< vendor_id > : vendor Id = 59
< module_id > : 102 - WDG Driver Module id (102) for user
configuration checks.
< Message_id.> : 001-999
<message_content>: Message content provides information
about error or warning or information displayed
when the user has configured incorrect inputs.
File Name’ and ‘Path’ need not be present for all
Error/Warning/Information messages
File Name: Name of the file in which the error has
occurred
Path: Absolute path of the container in which the
parameter is present
21
Chapter 7 User Configuration Validatio n
22
Configuration Overview Chapter 8
Chapter 8 Configuration Overview
8.1. Container Overview
The following figure represents container overview.
Wdg
WdgDemEventParameterRefs
WdgSettingsConfig
WdgPublishedInformation
WdgGeneral
Wd
gExternalConf
WdgSettingsFast
WdgSettingsSlow
WdgSettingsOff
igur ation
Figure 8-1 Configuration overview
8.1.1. Pre-Compile Configurable Parameters
Table 8-1 Pre-Compile Configurable Parameters
Container
Parameter
Parameter
Parameter Range
Parameter Description
Name
Name
Type
WdgGeneral
WdgDevErrorDetect
Boolean
TRUE / FALSE
This parameter compile switch to
enable / disable development error
detection for this module.
WdgDisableAllowed
Boolean
TRUE / FALSE
This parameter compile switch to
allow / forbid disabling the
watchdog driver during runtime.
WdgIndex
Integer
0
Represents the watchdog driver's ID
so that it can be referenced by the
watchdog interface.
WdgInitialTimeout
Integer
0 – 65.535
The initial timeout (sec) for the
trigger condition to be initialized
during Init function. It shall be not
larger than WdgMaxTimeout.
WdgMaxTimeout
Integer
0 – 65.535
The maximum timeout (sec) to
which the watchdog trigger
condition can be initialized.
23
Chapter 8 Configuration Ove rview
Container
Parameter
Parameter
Parameter Range
Parameter Description
Name
Name
Type
WdgGeneral
WdgRunArea
Enumeration
RAM or ROM
This parameter Represents the
watchdog driver execution area is
either from ROM (Flash) or RAM as
required with the particular
microcontroller.
WdgTriggerLocation
Function
NULL
Location (memory address) of the
watchdog trigger routine. This
parameter is not used for
implementation.
WdgVersionInfoApi
Boolean
TRUE / FALSE
This parameter Compile switch to
enable / disable the version
information API.
WdgCriticalSectionP
Boolean
TRUE / FALSE
This parameter specifies if the WDG
rotection
driver CPU load can be reduced by
disabling
the
enter/exit
critical
section functionality by adding a
precompiled
configuration
parameter to the ADC driver
configuration.
WdgVaryingActivatio
Boolean
ENABLE / DISABLE
This parameter enables / disables
nCodeMode
Varying Activation Code Mode.
WdgVersionCheckE
Boolean
TRUE / FALSE
This parameter Enable / disable
xternalModules
AUTOSAR Version check for inter-
module dependencies.
WdgDeviceName
Enumeration
R7F701370A, R7F701371,
This parameter contains the
R7F701372, R7F701373,
supported device name to identify
R7F701374
the device specific C header file
through Translation XML File.
WdgWriteVerify
Enumeration
WV_DISABLE,
This parameter contains the
WV_INIT_ONLY,
supported Register read back
WV_INIT_RUNTIME
functionality to verify the registers
throughout the embedded code.
WdgInterruptConsist
Boolean
TRUE / FALSE
This parameter enables / disables
encyCheck
Interrupt consistency check.
WdgUseWriteVerify
Boolean
TRUE / FALSE
This parameter enables / disables
ErrorInterface
Error interface.
WdgWriteVerifyError
Function
NULL
Function for write verify error
Interface
interface
WdgClockRef
Reference
--
This parameter specifies
assignment of WDTATCKI clock for
a WDTA instance 0.
24
Configuration Overview Chapter 8
8.1.2. Post Build Time Configurable Parameters
Table 8-2 Post Build Time Configurable Parameters
Container
Parameter Name
Parameter
Parameter Range
Parameter Description
Name
Type
WdgSettingsCo
WdgDefaultMode
Enumeration
WDGIF_FAST_MODE: Default
Default mode for watchdog driver
nfig
watchdog mode is "fast".
initialization.
WDGIF_OFF_MODE: Default
watchdog mode is "off".
WDGIF_SLOW_MODE:
Default watchdog mode is
"slow".
WdgClkSettingsFast
Enumeration
TWO_POWOF_9_ DIVBY_
These parameters contain hardware
WDGCLK to
dependent clock settings for the
TWO_POWOF_16_ DIVBY_
watchdog driver's "fast" mode.
WDGCLK
WdgSettingsSlow
Enumeration
TWO_POWOF_9_ DIVBY_
These parameters contain hardware
WDGCLK to
dependent clock settings for the
TWO_POWOF_16_ DIVBY_
watchdog driver's "slow" mode.
WDGCLK
WdgDemEvent
WDG_E_DISABLE_R
Symbolic Name
NA
This parameter specifies the
ParameterRefs
EJECTED
reference to the DemEventParameter
which shall be issued when the error
"Initialization or mode switch failed
because it would disable the
watchdog" has occurred.
WDG_E_MODE_FAIL
Symbolic Name
NA
This parameter specifies the
ED
reference to the DemEventParameter
which shall be issued when the error
"Setting a watchdog mode failed
(during initialization or mode switch)"
has occurred.
WDG_E_INT_INCON
Symbolic Name
NA
Reference to the
SISTENT
DemEventParameter which shall be
issued when Interrupt consistency
error was detected.
WDG_E_REG_WRIT
Symbolic Name
NA
Reference to the
E_VERIFY
DemEventParameter which shall be
issued when a register write-verify
failure was detected. If the reference
is not configured the error shall not
be reported.
25
Chapter 8 Configuration Ove rview
26
Messages Chapter 9
Chapter 9 Messages
The messages help to identify the syntax or semantic errors in the ECU
Configuration Description File. Hence it ensures validity and correctness of the
information available in the ECU Configuration Description File.
The following section gives the list of error, warning and information messages
displayed by the MCAL Code Generator Tool.
9.1 Error Messages
ERR_59_102_001: parsing of <Module Name> module is incorrect.
This error occurs, if the parameters are not parsed for the corresponding modules
ERR_59_102_004: References path of Parameter
WDG_E_DISABLE_REJECTED is not correct in
<Wdg/WdgDemEventParameterRefs/WDG_E_DISABLE_REJECTED>.
This error occur when the path configured for WDG_E_DISABLE_REJECTED is
incorrect.
ERR_59_102_005: References path of Parameter WDG_E_MODE_FAILED is
not correct in <Wdg/WdgDemEventParameterRefs/WDG_E_MODE_FAILED>.
This error occur when the path configured for WDG_E_MODE_FAILED is incorrect.
ERR_59_102_006: Minimum instances of LowerMultiplicity for container
should be configured <Wdg/WdgGeneral>.
This error occur when minimum instances of container WdgGeneral are not
configured.
ERR_59_102_008: References WdgClockRef is not configured in
<Wdg/WdgGeneral/WdgClockRef>.
This error occur when WdgClockRef path is not configured.
ERR_59_102_009: References path of Parameter WdgClockRef is not correct
in <Wdg/WdgGeneral/WdgClockRef>.
This error occur when WdgClockRef path configured is not correct.
ERR_59_102_013: Parameter WDG_E_INT_INCONSISTENT is not configured
in <WdgDemEventParameterRefs>.
This error will occur, if the parameter 'WDG_E_INT_INCONSISTENT' is not
configured in WdgDemEventParameterRefs and WdgInterruptConsistencyCheck' in
container 'WdgGeneral' is configured as true.
ERR_59_102_014: References path of Parameter WDG_E_INT_INCONSISTENT
is not correct in <WdgDemEventParameterRefs>.
This error will occur, if References path of Parameter
'WDG_E_INT_INCONSISTENT' in container 'WdgDemEventParameterRefs'is not
correct.
27
Chapter 9 Messages
ERR_59_102_015: WdgWriteVerifyErrorInterface should configured with other
than NULL because WdgUseWriteVerifyErrorInterface is configured as true.
This error will occur, if Parameter ‘WdgWriteVerifyErrorInterface’ is configured as
NULL while parameter ‘WdgUseWriteVerifyErrorInterface’ is configured as true.
ERR_59_102_016: Parameter WDG_E_REG_WRITE_VERIFY is not configured
in <WdgDemEventParameterRefs>.
This error will occur, if the parameter ‘WDG_E_REG_WRITE_VERIFY’ is not
configured in container ‘WdgDemEventParameterRefs’ and WdgWriteVerify is not
WV_DISABLE.
ERR_59_102_018: References path of Parameter WDG_E_REG_WRITE
_VERIFY is not correct in <WdgDemEventParameterRefs>.
This error will occur, if References path of Parameter 'WDG_E_REG_WRITE
_VERIFY ' is not correct in container ' WdgDemEventParameterRefs’.
ERR_59_102_019: The value of the parameter WdgDisableAllowed should not
be <false> since the value of the parameter WdgDefaultMode is configured as
<WDGIF_OFF_MODE>.
This error occurs when the parameter WdgDisableAllowed is false and
WdgDefaultMode is configured as WDGIF_OFF_MODE.
ERR_59_102_020: Minimum instances of LowerMultiplicity for sub container
should be configured <Wdg/WdgSettingsConfig/WdgSettingsFast>.
This error occur when minimum instances of sub container WdgSettingsFast are not
configured.
ERR_59_102_021: Maximum possible instances of UpperMultiplicity exceeds
sub container <Wdg/WdgSettingsConfig/WdgSettingsFast>.
This error occur when number of instances exceeds the maximum possible
instances of WdgSettingsFast sub container.
ERR_59_102_022: The value configured for the parameter
WdgClkSettingsSlow in the container <WdgSettingsSlow> is faster than the
value of the parameter WdgClkSettingsFast in the container
<WdgSettingsFast>
This error occur when the value of the parameter WdgClkSettingsSlow in the
container ‘WdgSettingsSlow’ faster than the value of parameter
WdgClkSettingsFast in the container ‘WdgSettingsFast’
ERR_59_102_023: Minimum instances of LowerMultiplicity for sub container
should be configured <Wdg/WdgSettingsConfig/WdgSettingsOff>.
This error occur when minimum instances of sub container WdgSettingsOff are not
configured.
ERR_59_102_024: Maximum possible instances of UpperMultiplicity exceeds
sub container <Wdg/WdgSettingsConfig/WdgSettingsOff>.
This error occur when number of instances exceeds the maximum possible
instances of WdgSettingsOff sub container.
ERR_59_102_025: Minimum instances of LowerMultiplicity for sub container
should be configured <Wdg/WdgSettingsConfig/WdgSettingsSlow>.
28
Messages Chapter 9
This error occur when minimum instances of sub container WdgSettingsSlow are
not configured.
ERR_59_102_026: Maximum possible instances of UpperMultiplicity exceeds
sub container <Wdg/WdgSettingsConfig/WdgSettingsSlow>.
This error occur when number of instances exceeds the maximum possible
instances of WdgSettingsSlow sub container.
ERR_59_102_033: Minimum 1 WdgPublishedInformation instance is needed.
This error occur when minimum instances of container WdgPublishedInformation
are not configured.
ERR_59_102_037: Minimum instances of LowerMultiplicity for container
should be configured <Wdg/WdgSettingsConfig>.
This error occur when minimum instances of container WdgSettingsConfig are not
configured.
ERR_59_102_038: Maximum possible instances of UpperMultiplicity exceeds
container <Wdg/WdgSettingsConfig>.
This error occur when number of instances exceeds the maximum possible
instances of WdgSettingsConfig container.
ERR_59_102_039: The variant <WdgDeviceVariant> is not supported currently
This error will occur, if device variant other than P1X-C variants are configured.
ERR_59_102_040: The container WdgDemEventParameterRefs should be
configured, since the value of parameter 'WdgInterruptConsistencyCheck' is
configured as true.
This error will occur, if WdgDemEventParameterRefs is not configured and
'WdgInterruptConsistencyCheck' is configured as true.
ERR_59_102_041: The container WdgDemEventParameterRefs should be
configured, since the value of parameter 'WdgWriteVerify' is
<WV_INIT_RUNTIME>./ <WV_INIT_ONLY>.
This error will occur, if WdgDemEventParameterRefs is not configured and if
'WdgWriteVerify' is configured as either <WV_INIT_RUNTIME> or
<WV_INIT_ONLY>.
ERR_59_102_042: The error notification configured for the parameter
'WdgWriteVerifyErrorInterface' should follow C syntax < [a-z A-Z][a-z A-Z 0-
9_]>
This error will occur if the parameter WdgWriteVerifyErrorInterface in container
WdgGeneral0 does not follow C syntax <[a-zA-Z][a-zA-Z0-9_]>.
ERR_59_102_053: The value of the parameter WdgInitialTimeout is greater
than the value of the parameter WdgMaxTimeout.
This error occurs when the initial WdgInitialTimeout value exceeds WdgMaxTimeout
value.
29
Chapter 9 Messages
9.2 Warning Messages
WARNING_59_102_001: 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 when parameter WdgInitialTimeout is configured as 0 and
WdgDefaultMode is configured as either WDGIF_FAST_MODE or
WDGIF_SLOW_MODE
9.3 Information Messages
INFO_59_102_001/2: The duration of 75% of one WDG trigger cycle for
slow/fast mode is < calculated_value in msec > msec
This message provides information about the 75% time duration of one WDG trigger
cycle
INFO_59_102_103: WdgUseWriteVerifyErrorInterface functionality has no
effect when WdgWriteVerify parameter is DISABLED.
This information occurs if WdgWriteVerify parameter is DISABLED and
WdgUseWriteVerifyErrorInterface is configured TRUE.
INFO_59_102_104: Parameter WDG_E_MODE_FAILED/
WDG_E_DISABLE_REJECTED is not configured in
<WdgDemEventParameterRefs>.
This message provides information when WDG_E_MODE_FAILED /
WDG_E_DISABLE_REJECTED is not configured in the container
‘WdgDemEventParameterRefs’
30
Revision History
Sl.No. Description
Version
Date
1.
Initial Version
1.0.0
10-Aug-2015
2.
The following changes are made:
1.0.1
16-Feb-2016
1. Added R-number for the document.
2. Added parameter WdgRegReadBackEnable in Figure 8-1
Configuration overview.
3. Added parameter WdgRegReadBackEnable in 8.1.1 Pre-Compile
Configurable Parameters.
4. Note added for error/warning/info messages in Chapter 10
3.
The following changes are made:
1.0.2
22-Feb-2017
1. In section 8.1.2, replaced the old naming convention with
TWO_POWOF_9_ DIVBY_ WDGCLK and TWO_POWOF_9_
DIVBY_ WDGCLK.
2. R-number updated for the document.
3. In section 9.1, ERR_59_102_003, ERR_59_102_007,
ERR_59_102_034, ERR_59_102_041, ERR_59_102_042,
ERR_59_102_045, ERR_59_102_046, ERR_59_102_047,
ERR_59_102_048, ERR_59_102_052 & ERR_59_102_054 are
removed.
4. In section 9.1, ERR_59_102_013, ERR_59_102_014,
ERR_59_102_015, ERR_59_102_016, ERR_59_102_018,
ERR_59_102_019, ERR_59_102_020, ERR_59_102_021,
ERR_59_102_022, ERR_59_102_023, ERR_59_102_024,
ERR_59_102_025, ERR_59_102_026 & ERR_59_102_039 are
added.
5. In section 9.3, INFO_59_102_103 & INFO_59_102_104 are added.
6. Removed chapters Section 9 Generation Tool Options, Section11
Notes and replaced the phrases Tool, Generator Tool, WDG Driver
Generator tool with MCAL Code Generator Tool in this document.
7. Updated Reference Document details in Chapter 2.
8. Figure 3-2 of Chapter 3 is updated and added Remark in the same
chapter.
9. Updated chapter 6 by adding two more points.
10. Updated Figure 8-1, Table 8-1 and Table 8-2 in chapter 8.
11. Figure 3-2 is renamed from Flow-Diagram of MCAL Code Generator
Tool to Flow-Diagram of Code Generation
12. Updated section 9.1 Error Messages with new errors
ERR_59_102_040, ERR_59_102_041, ERR_59_102_042,
ERR_59_102_043.
13. Table 8-2 updated with WdgDemEventParameterRefs.
31
AUTOSAR MCAL R4.0.3 User's Manual
WDG Driver Component Ver.1.0.2
Generation Tool User's Manual
Publication Date: Rev.1.00, February 22, 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
R20UT3662EJ0100
Document Outline
- Chapter 1 Introduction
- Chapter 2 Reference
- Chapter 3 Code Generation Overview
- Chapter 4 Input Files
- Chapter 5 Output Files
- Chapter 6 Precautions
- Chapter 7 User Configuration Validation
- Chapter 8 Configuration Overview
- Chapter 9 Messages
7 - Wdg Integration Manual
Integration Manual
For
Wdg
VERSION: 1
DATE: 07/09/17
Prepared By:
Software Group,
Nexteer Automotive,
Saginaw, MI, USA
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
| Sl. No. | Description | Author | Version | Date |
| 1 | Initial version | Lucas Wendling | 1 | 07/09/17 |
Table of Contents
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 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
Abbrevations And Acronyms
| Abbreviation | Description |
References
This section lists the title & version of all the documents that are referred for development of this document
| Sr. No. | Title | Version |
Dependencies
This component relies on installation of the Renesas MCAL CodeGenerator utilitiy. Currently, this utility is required to be installed on the integrator’s component and this component assumes this utility is installed in the default installation directory. This places the executable in the “C:\Renesas\CodeGenerator\code_generator\MCALGenerator.exe” directory. This component requires version “2.06.03” of the MCAL Code Generator.
SWCs
| Module | Required Feature |
Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.
Global Functions(Non RTE) to be provided to Integration Project
API usage and scheduling of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
Configuration REQUIREMeNTS
Configuration of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
Build Time Config
| Modules | Notes | |
Configuration Files to be provided by Integration Project
N/A
Da Vinci Parameter Configuration Changes
| Parameter | Notes | SWC |
DaVinci Interrupt Configuration Changes
| ISR Name | Notes |
Manual Configuration Changes
| Constant | Notes | SWC |
Integration DATAFLOW REQUIREMENTS
Required Global Data Inputs
Required Global Data Outputs
Specific Include Path present
Yes
Runnable Scheduling
API usage and scheduling of BSW components expected to be captured at a project architectural level and is beyond the scope of this document. Third party documentation can be referenced as needed.
| 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
| Feature | RAM | ROM |
NvM Blocks
Compiler Settings
The MCAL related files require specific compiler toolchain settings to be used to match what the MCAL was developed and tested to. This is the following:
-c -Osize -g -cpu=rh850g3m -gsize -prepare_dispose -inline_prologue -sda=all -Wundef -no_callt -reserve_r2 --short_enum --prototype_errors --diag_error 193 -dual_debug -large_sda --no_commons -shorten_loads -shorten_moves -Wshadow -nofloatio -ignore_callt_state_in_interrupts -delete
This component’s .gpj file has been adapted to provide these options for the static files of this component. NOTE: The dynamic, generated files from this component need to be compiled with these options as well, and therefore the integration project will need to be adapted to provide these settings to the generated files in the integration project.
The following snippet can be adapted/added to the a batch file which creates the generate.gpj project for integration project usage:
for %%F in (../generate/<MCAL_Component>/*.c) do (
ECHO ..\generate\<MCAL_Component>\%%F >> generate.gpj
ECHO # MCAL BUILD OPTIONS # >> generate.gpj
ECHO -c >> generate.gpj
ECHO -Osize >> generate.gpj
ECHO -g >> generate.gpj
ECHO -cpu=rh850g3m >> generate.gpj
ECHO -gsize >> generate.gpj
ECHO -prepare_dispose >> generate.gpj
ECHO -inline_prologue >> generate.gpj
ECHO -sda=all >> generate.gpj
ECHO -Wundef >> generate.gpj
ECHO -no_callt >> generate.gpj
ECHO -reserve_r2 >> generate.gpj
ECHO --short_enum >> generate.gpj
ECHO --prototype_errors >> generate.gpj
ECHO --diag_error 193 >> generate.gpj
ECHO -dual_debug >> generate.gpj
ECHO -large_sda >> generate.gpj
ECHO --no_commons >> generate.gpj
ECHO -shorten_loads >> generate.gpj
ECHO -shorten_moves >> generate.gpj
ECHO -Wshadow >> generate.gpj
ECHO -nofloatio >> generate.gpj
ECHO -ignore_callt_state_in_interrupts >> generate.gpj
ECHO -delete >> generate.gpj
)
Preprocessor MACRO
Optimization Settings
Appendix
<This section is for appendix>
8 - Wdg Peer Review Checklist
Overview
Summary SheetSynergy Project
3rd Party Files
Integration Manual