This is the multi-page printable view of this section. Click here to print.
DIO Driver
1 - Dio Integration Manual
Integration Manual
For
Dio
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>
2 - Dio Peer Review Checklist
Overview
Summary SheetSynergy Project
3rd Party Files
Integration Manual
Sheet 1: Summary Sheet
Sheet 2: Synergy Project
Sheet 3: 3rd Party Files
Sheet 4: Integration Manual
3 - R20UT3639EJ0102-AUTOSAR
4 - R20UT3639EJ0102-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
Page 57
Page 58
Page 59
Page 60
5 - R20UT3639EJ0102-AUTOSARs



AUTOSAR MCAL R4.0.3
User’s Manual
DIO Driver Component Ver.1.0.4
Embedded User’s Manual
Target Device:
RH850\P1x-C
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev.1.02 Jun 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
CAN
Controller Area Network
DEM
Diagnostic Event Manager
DET/Det
Development Error Tracer
DIO
Digital Input Output
ECU
Electronic Control Unit
EEPROM
Electrical Erasable Programmable Read Only Memory
Id
Identifier
I/O
Input/Output
MCAL
MicroController Abstraction Layer
MCU
MicroController Unit
PWM
Pulse Width Modulation
RAM
Random Access Memory
ROM
Read Only Memory
RTE
Run Time Environment
SCI
Serial Communication Interface
Definitions
Term
Represented by
Port
Represents a whole configurable port on a microcontroller device.
Port Pin
Represents a single configurable input or output pin on a
microcontroller device.
Sl. No.
Serial Number
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
DIO 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.
Deviation List ...................................................................................................................... 21
4.5.
User mode and supervisor mode ...................................................................................... 21
Chapter 5 Architecture Details ........................................................ 23
Chapter 6 Registers Details ............................................................. 27
Chapter 7 Interaction Between The User and DIO Driver
Component .......................................................................................... 29
7.1.
Services Provided By DIO Driver Component to the User ......................................... 29
Chapter 8 DIO Driver Component Header And Source File
Description .......................................................................................... 31
Chapter 9 Generation Tool Guide .................................................... 35
Chapter 10 Application Programming Interface ............................... 37
10.1.
Imported Types ................................................................................................................... 37
10.1.1.
Standard Types .................................................................................................... 37
10.1.2.
Other Module Types ............................................................................................. 37
10.2.
Type Definitions .................................................................................................................. 37
10.2.1.
Dio_PortType ....................................................................................................... 37
10.2.2.
Dio_ChannelType ................................................................................................ 37
10.2.3.
Dio_PortLevelType ............................................................................................... 38
10.2.4.
Dio_ConfigType ................................................................................................... 38
10.3.
Function Definitions ........................................................................................................... 38
10.3.1.
Dio_ReadChannel ................................................................................................ 39
10.3.2.
Dio_WriteChannel ................................................................................................ 39
10.3.3.
Dio_FlipChannel ................................................................................................... 40
10.3.4.
Dio_ReadPort ....................................................................................................... 40
10.3.5.
Dio_WritePort ....................................................................................................... 41
10.3.6.
Dio_MaskedWritePort .......................................................................................... 41
10.3.7.
Dio_ReadChannelGroup ...................................................................................... 42
10.3.8.
Dio_WriteChannelGroup ...................................................................................... 42
10.3.9.
Dio_GetVersionInfo .............................................................................................. 43
10.3.10. Dio_Init ................................................................................................................. 44
Chapter 11 Development And Production Errors ............................. 45
7
11.1.
Dio Driver Component Development Errors .................................................................... 45
11.2.
Dio Driver Component Production Errors ........................................................................ 46
Chapter 12 Memory Organization ...................................................... 47
Chapter 13 P1x-C Specific Information ............................................. 49
13.1.
Interaction between the User and DIO Driver Component .............................................. 49
13.1.1.
Parameter Definition File ...................................................................................... 49
13.2.
Sample Application............................................................................................................. 49
13.2.1
Sample Application Structure ............................................................................... 49
13.2.2
Building Sample Application ................................................................................. 51
13.2.2.1
Configuration Example ..................................................................... 51
13.2.2.2
Debugging the Sample Application .................................................. 51
13.3.
Memory and Throughput ................................................................................................... 52
13.3.1
ROM/RAM Usage ................................................................................................ 52
13.3.2
Stack Depth .......................................................................................................... 53
13.3.3
Throughput Details ............................................................................................... 53
13.4.
Critical Section Details ....................................................................................................... 53
Chapter 14 Release Details ................................................................ 55
8
List of Figures
Figure 1-1
System Overview of AUTOSAR Architecture ...................................................... 11
Figure 1-2
System Overview Of The DIO Driver In AUTOSAR MCAL Layer ........................ 12
Figure 5-1
DIO Driver Architecture ........................................................................................ 23
Figure 5-2
DIO Driver Services ............................................................................................. 24
Figure 12-1
DIO Driver Component Memory Organization ..................................................... 47
Figure 13-1
Overview of DIO Driver Sample Application ........................................................ 49
List of Tables
Table 4-1
DIO Driver Protected Resources List ................................................................... 20
Table 4-2
DIO Driver Deviation List ...................................................................................... 21
Table 4-3
User mode and Supervisor mode details ............................................................. 21
Table 6-1
Register Details .................................................................................................... 27
Table 8-1
Description Of The DIO Driver Component Files ................................................. 32
Table 10-1
APIs Used in DIO Driver Component ................................................................... 38
Table 13-1
ROM/RAM Details without DET ........................................................................... 52
Table 13-2
ROM/RAM Details with DET ................................................................................ 52
Table 13-3
Throughput Details of the APIs ............................................................................ 53
Table 13-4
Critical Section Throughput Details of the APIs ................................................... 53
9
10
Introduction Chapter 1
Chapter 1 Introduction
The purpose of this document is to describe the information related to DIO
Driver Component for Renesas P1x-C microcontrollers.
This document shall be used as reference by the users of DIO 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
DI O Drive r
Microcontroller
Figure 1-1
System Overview of AUTOSAR Architecture
The DIO Driver is part of the MCAL, the lowest layer of Basic Software in the
AUTOSAR environment.
11
Chapter 1 Introduction
The Figure in the following page depicts the DIO Driver as part of layered
AUTOSAR MCAL Layer:
Microcontroller Drivers
Memory Drivers
Communication Drivers
I/O Drivers
In
E
In
te
x
W
t
te
r
S
n
e
a
GP
M
r
r
a
P
F
t
n
n
c
C
C
R
l
I
a
C
l
PO
a
E
H
L
e
P
A
D
I
hd
T
U
ore
A
l
l
I
AN
x
C
W
D
I
E
an
N
M
F
R
O
D
o
F
U
R
D
l
P
M
C
g
a
la
D
a
T
ri
ri
T
s
R
d
D
y
D
D
T
l
D
v
D
v
e
e
s
e
r
h
OM
i
D
h
v
r
r
r
D
D
er
r
er
s
st
r
i
i
r
i
D
er
v
v
r
i
v
ri
i
v
i
t
D
D
e
r
er
v
v
i
er
er
v
ri
e
r
r
r
v
er
er
v
D
i
i
e
r
v
v
r
er
er
r
e
i
v
r
er
E
EEP
Po
Micro-
F
x
L
G
W
C
L
M
t
SPI
S
C
C
P
D
A
I
.
P
lo
w
A
M
N
C
AN
CU
W
I
D
O
D
B
C
T
c
e
controller
S
R
I
or
M
C
U
T
k
r
U
H
O
&
S
Figure 1-2 System Overview Of The DIO Driver In AUTOSAR MCAL Layer
The DIO Driver Component provides the service for reading and writing to
Channels, ChannelGroups and Ports.
The DIO Driver Component comprises of two sections, that is, Embedded
Software and the Configuration Tool to achieve scalability and configurability.
The DIO Driver Component Code Generation Tool is a command line tool that
accepts ECU configuration description file(s) as input and generates source
and header file(s). The ECU configuration description is an XML file that
contains information about the configuration for Port Pins. The tool generates
Dio_PBcfg.c, Dio_Lcfg.c, Dio_Hardware.c, Dio_Hardware.h and Dio_Cfg.h,
Dio_Cbk.h files.
12
Introduction Chapter 1
1.1.
Document Overview
The document has been segmented for easy reference. The table below
provides the user with an overview of the contents of each section:
Section
Contents
Section 1 (Introduction)
This section provides an introduction and overview of DIO 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 DIO
Process)
Driver Component. This section also explains about the Makefile
descriptions, Integration of DIO Driver Component with other
components, building the DIO Driver Component along with a sample
application.
Section 4 (Forethoughts)
This section provides brief information about the DIO Driver Component,
the preconditions that should be known to the user before it is used, data
consistency details and deviation list.
Section 5 (Architecture Details)
This section describes the layered architectural details of the DIO Driver
Component.
Section 6 (Registers Details)
This section describes the register details of DIO Driver Component.
Section 7 (Interaction Between
This section describes interaction of the DIO Driver Component with the
User And DIO Driver Component) upper layers.
Section 8 (DIO Driver Component This section provides information about the DIO Driver Component
Header And Source File
source files. This section also contains the brief note on the tool
Description)
generated output file.
Section 9 (Generation Tool Guide) This section provides information on the DIO Driver Component
Generation Tool.
Section 10 (Application
This section explains all the APIs provided by the DIO 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
Specification of DIO Driver (AUTOSAR_SWS_DIODriver.pdf)
2.5.0
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/P1x-C Group User’s Manual: Hardware
1.20
(r01uh0517ej0120_rh850p1x-c_Open.pdf)
4.
Specification of Compiler Abstraction
(AUTOSAR_SWS_CompilerAbstraction.pdf)
3.2.0
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 DIO Driver Component is
explained. Description of the makefiles along with samples is provided.
Remark The details about the C Source and Header files that are generated by the
DIO Driver Generation Tool are mentioned in the “R20UT3640EJ0102-
AUTOSAR.pdf”.
3.1
DIO Driver Component Makefile
The Makefile provided with the DIO Driver Component consists of the GNU
Make compatible script to build the DIO 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\dio\src\Dio.c
\Dio_Version.c
\Dio_Ram.c
X1X\common_platform\modules\dio\include\Dio.h
\Dio_Debug.h
\Dio_PBTypes.h
\Dio_Ram.h
\Dio_Version.h
\Dio_RegWrite.h
X1X\ P1x-C \modules\dio\sample_application\make\ghs
\App_Dio_P1x-C_Sample.mak
\App_Dio_P1x-C_Sample.ld
X1X\ P1x-C\modules\dio\sample_application\<SubVariant>
\obj\<Compiler>
X1X\P1x-C \modules\dio\generator
\R403_DIO_ P1x-C_BSWMDT.arxml
X1X\ P1x-C \modules\dio\user_manual
(User manuals will be available in this folder).
17
Chapter 3 Integration and Build Process
Note: 1. <AUTOSAR_version> should be 4.0.3
2. <SubVariant> can be P1H-C, P1H-CE or P1M-C.
18
Forethoughts Chapter 4
Chapter 4 Forethoughts
4.1.
General
Following information will aid the user to use the DIO Driver Component
software efficiently.
• At initialization state, DIO Driver does not initialize or write on any registers
• The DIO Driver does not enable or disable the ECU or Microcontroller
power supply. The upper layer should handle this operation.
• Start-up code is not part of DIO Driver.
• DIO Driver does not provide any callback notification to upper layer.
• DIO Driver does not have any scheduled functions.
• DIO Driver supports the Read-back feature.
• The DIO Driver Component is Post-build time configurable for R4.0.3.
• To access the Hardware Registers, The MCAL user should use the Low
Level Driver Layer. The MCAL user does not write or read any data
directly from any register, but uses the AUTOSAR standard APIs provided
by the MCAL Layer.
• When the channel is configured as Output, then the PPR register will
reflect the Hardware pin level only when the Port Bi-Direction Control
Register (PBDC) is enabled. Or else only the Port register value will be
updated in the PPR register for the Output configured channels.
4.2.
Preconditions
Following preconditions have to be adhered by the user, for proper
functioning of the DIO Driver Component:
• The Dio_Cfg.h, Dio_PBcfg.c files generated by the DIO Driver
Component Code Generation Tool have to be linked along with DIO
Driver Component source files.
• File Dio_PBcfg.c generated by DIO Driver Component
Generation Tool can be compiled and linked independently.
• The application has to be rebuilt, if there is any change in the Dio_Cfg.h
and Dio_PBcfg.c file generated by the DIO Driver Component Generation
Tool.
• Dio_Ram.c and Dio_Ram.h are used only for Autosar release 4.0.3.
• The DIO Driver Component needs to be initialized before accepting any API
requests. Dio_Init should be called to initialize DIO Driver Component.
• The authorization of the user for calling the software triggering of a
hardware reset is not checked in the DIO Driver. This will be the
responsibility of the upper layer.
• The user should ensure that DIO Driver Component API requests
are invoked with correct input arguments.
19
Chapter 4 Forethoughts
• Input parameters are validated only when the static configuration
parameter DioDevErrorDetect is enabled. Application should ensure that
the right parameters are passed while invoking the APIs when
DioDevErrorDetect is disabled.
• A mismatch in the version numbers of header and the source files will
result in a compilation error. User should ensure that the correct versions
of the header and the source files are used.
• The DIO functions shall be called only after PORT Driver
initialization, otherwise DIO functions will exhibit undefined behavior.
• User/Integrator should ensure that same Ports/Pins are configured for
DIO Driver component.
• The user shall configure the exact Module Short Name Dio in
configurations, as specified in config.xml file and the same shall be given
in command line.
• Safety features related to Register_write verification are only available if
‘DioWriteVerify’ is enabled.
4.3.
Data Consistency
To support the re-entrance and interrupt services, the AUTOSAR DIO
component will ensure the data consistency while accessing its own RAM
storage or hardware registers. The DIO component will use
SchM_Enter_Dio_<Exclusive Area> and SchM_Exit_Dio_<Exclusive Area>
functions. The SchM_Enter_Dio_<Exclusive Area> function is called before
the data needs to be protected and SchM_Exit_Dio_<Exclusive Area>function
is called after the data is accessed.
The following exclusive area along with scheduler services is used to provide
data integrity for shared resources:
DIO_REGISTER_PROTECTION
This function can be disabled by disabling the configuration parameter
‘Dio_CriticalSectionProtection’.
If the ‘DioCriticalSectionProtection’ parameter is enabled then the critical
section protection is applicable to the APIs in DIO Module. The details of
applicable APIs are given below:
Table 4-1 DIO Driver Protected Resources List
API Name
Exclusive Area Type
Protected Resources
Dio_WritePort
DIO_REGISTER_PRO
HW Registers:
TECTION
PMSR
Dio_WriteChannel
DIO_REGISTER_PROT
HW Registers:
ECTION
PMSR
Dio_FlipChannel
DIO_REGISTER_PROT
HW Registers:
ECTION
PMSR
PNOT
Dio_WriteChannel
DIO_REGISTER_PROT
HW Registers:
Group
ECTION
PMSR
20
Forethoughts Chapter 4
API Name
Exclusive Area Type
Protected Resources
Dio_MaskedWriteP
DIO_REGISTER_PROT
HW Registers:
ort
ECTION
PMSR
Note: The highest measured duration of a critical section was 0.0724 micro
seconds measured for Dio_WriteChannelGroup API
4.4.
Deviation List
Table 4-2 DIO Driver Deviation List
Sl. No.
Description
AUTOSAR Bugzilla
1.
The API Dio_MaskedWritePort which is available in R3.2.2 is also
-
added to R4.0.3 release.
2.
In case of Multiple configuration sets used, configuring different short
-
name for the containers 'DioPort', 'DioChannel' and
'DioChannelGroup' across the configuration set shall result in
generation error.
3.
In case of Multiple configuration sets used, configuring different
-
number of ‘DioPort’ or 'DioChannel' or 'DioChannelGroup' containers
across the configuration set shall result in generation error.
4.5.
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 User mode and Supervisor mode details
Sl. No.
API Name
User Mode
Supervisor
Known limitation in
Mode
User mode
1.
Dio_Init
x
x
-
2.
Dio_ReadPort
x
x
-
3.
Dio_WritePort
x
x
-
4.
Dio_ReadChannel
x
x
-
5.
Dio_WriteChannel
x
x
-
6.
Dio_FlipChannel
x
x
-
7.
Dio_ReadChannelGroup
x
x
-
8.
Dio_WriteChannelGroup
x
x
-
9.
Dio_MaskedWritePort
x
x
-
10.
Dio_GetVersionInfo
x
x
-
Note: Implementation of Critical Section is not dependent on MCAL. Hence
Critical Section is not considered to the entries for User mode in the
above table.
The user can switch between user mode and supervisor mode during
Enter/Exit critical section functions, so that these functions will work
properly even though critical section protection is ON.
21
Chapter 4 Forethoughts
22


















Architecture Details Chapter 5
Chapter 5 Architecture Details
The overview of the AUTOSAR DIO software architecture is given in the
following figure. The DIO Driver Component access the hardware features
directly. The upper layers call the functionalities provided by DIO Driver
Component:
I/O Hardware Abstraction Software
I/O Hardware Abstraction
Dio_WritePort
Dio_ReadPort
Dio_WriteChannelGroup
Dio_ReadChannelGroup
Dio_WriteChannel
Dio_ReadChannel
Dio_MaskedWritePort
Dio_GetVersionInfo
Dio_Init
Dio Driver
Dio_FlipChannel
On Chip Registers
On Chip Hardware
Figure 5-1 DIO Driver Architecture
23










Chapter 5 Architecture Details
DIO Driver Component:
The following figure shows the various functionalities as offered by the DIO
Driver.
Port
Read
Channel
Channel Group
Port
Write
Channel
Channel Group
Flip Channel
Channel
Figure 5-2
DIO Driver Services
The DIO Driver Component is divided into the following sub modules based
on the functionality required:
• Port Read and Port Write
• Channel Read and Channel Write
• ChannelGroup Read and ChannelGroup Write
• Flip channel
DIO Read Port
The levels of all channels of a DIO Port will be read. A bit value '0' indicates
the individual channels of the Port to physical STD_LOW, a bit value '1'
indicates the individual channels of the port to physical STD_HIGH. The level
of all channels of Port are read simultaneously.
DIO Read Channel
The level of a single DIO Channel will be read as either STD_LOW or
STD_HIGH.
24
Architecture Details Chapter 5
DIO Read ChannelGroup
The levels of all channels of a DIO Channel Group will be read. A bit value '0'
indicates the corresponding pin to physical STD_LOW, a bit value '1' indicates
the corresponding channel to physical STD_HIGH.
DIO Write Port
The levels of all channels of a Port will be set simultaneously without affecting
the functionality of the input channels. A bit value '0' sets the corresponding
channel to physical STD_LOW, a bit value '1' sets the corresponding channel
to physical STD_HIGH.
DIO Write Channel
The level of a single DIO Channel is set STD_HIGH or STD_LOW.
DIO Write ChannelGroup
All adjoining subset of DIO channels of a port are set simultaneously. A bit
value '0' sets the corresponding channel to physical STD_LOW, a bit value '1'
sets the corresponding channel to physical STD_HIGH.
DIO Initialization
All the global variables of the DIO modules will be initialized.
DIO Flip Channel
The level of a single DIO channel will be set with compliment of current level
that is, if current value is STD_HIGH then STD_LOW will be set and vice
versa and then the level of a single DIO Channel will be read.
DIO GetVersionInfo
The Dio_GetVersionInfo function shall return the version information of this
module. The version information includes module ID, Vendor ID and Vendor
specific version numbers.
DIO MaskedWrite Port
The Dio_MaskedWritePort function shall set the specified value for the
channels in the specified port if the corresponding bit in Mask is ‘1’.
25
Chapter 5 Architecture Details
26
Registers Details Chapter 6
Chapter 6 Registers Details
This section describes the register details of DIO Driver Component.
Table 6-1 Register Details
API Name
Registers
Configuration
Register Access
Macro/Variable
Parameter
R/W/RW
Dio_Init
-
-
-
Dio_ReadPort
PPRn
-
R
LddPortLevel
JPPRn
-
R
LddPortLevel
Dio_WritePort
PSRn
-
R/W
Level
JPSRn
-
R/W
Level
PMSRn
-
R
LulPortModeLevel
JPMSRn
-
R
LulPortModeLevel
Dio_ReadChannel
PPRn
DioChannelBitPosition
R
LddPortLevel
JPPRn
DioChannelBitPosition
R
LddPortLevel
Dio_WriteChannel
PSRn
DioChannelBitPosition
R/W
LunPSRContent.ulLong
Word
JPSRn
DioChannelBitPosition
R/W
LunPSRContent.ulLong
Word
PMSRn
-
R
LulPortModeLevel
JPMSRn
-
R
LulPortModeLevel
Dio_FlipChannel
PNOTn
DioChannelBitPosition
W
-
JPNOTn
DioChannelBitPosition
W
-
PPRn
DioChannelBitPosition
R
LddPortLevel
JPPRn
DioChannelBitPosition
R
LddPortLevel
PMSRn
-
R
U16pindirection
JPMSRn
-
R
U16pindirection
Dio_ReadChannelGroup
PPRn
DioPortMask and
R
LddPortLevel
DioPortOffset
JPPRn
DioPortMask and
R
LddPortLevel
DioPortOffset
Dio_WriteChannelGroup
PSRn
DioPortMask and
R/W
LulPortModeLevel
DioPortOffset
JPSRn
DioPortMask and
R/W
LulPortModeLevel
DioPortOffset
PMSRn
-
R
LulPortModeLevel
JPMSRn
-
R
LulPortModeLevel
Dio_GetVersionInfo
-
-
-
Dio_MaskedWritePort
PSRn
-
R/W
-
JPSRn
-
R/W
-
PMSRn
-
R
LulPortModeLevel
JPMSRn
-
R
LulPortModeLevel
27
Chapter 6 Registers Details
28
Interaction Between The User and DIO Driver Component Chapter 7
Chapter 7 Interaction Between The User and DIO
Driver Component
The details of the services supported by the DIO Driver Component to the
upper layers users and the mapping of the channels to the hardware units is
provided in the following sections:
7.1.
Services Provided By DIO Driver Component to the
User
The DIO Driver Component provides the following functionalities to the upper
layers or users:
• To initialize the DIO module.
• To read the physical level value from DIO Port.
• To write specified value into given DIO Port.
• To read physical level value from DIO Channel.
• To write a specified value into the given DIO Channel.
• To read physical level value from DIO ChannelGroup.
• To write specified value into DIO ChannelGroup.
• To read the DIO Driver Component version information.
• To flip the level of the channel and return the level of the channel after flip.
29
Chapter 7 Interaction Between The User and DIO Driver Component
30
DIO Driver Component Header And Source File Description Chapter 8
Chapter 8 DIO Driver Component Header And
Source File Description
This section explains the DIO Driver Component’s source and header files.
These files have to be included in the project application while integrating with
other modules.
The C header file generated by DIO Driver Component Code Generation
Tool:
•
Dio_Cfg.h
•
Dio_Hardware.h
•
Dio_Cbk.h
The C source file generated by DIO Driver Component Code Generation
Tool:
•
Dio_PBcfg.c
•
Dio_Lcfg.c
•
Dio_Hardware.c
The DIO Driver Component C header files:
•
Dio.h
•
Dio_Debug.h
•
Dio_PBTypes.h
•
Dio_Ram.h
•
Dio_Version.h
•
Dio_RegWrite.h
The DIO Driver Component C source files:
•
Dio.c
•
Dio_Ram.c
•
Dio_Version.c
The Stub C header files:
•
Compiler.h
•
Compiler_Cfg.h
•
MemMap.h
•
Platform_Types.h
•
rh850_Types.h
•
Det.h
•
Rte.h
•
SchM.h
•
SchM_Dio.h
•
Dem.h
•
Dem_cfg.h
31
Chapter 8 DIO Driver Component Header And Source File Description
The description of the DIO Driver Component files is provided in the table
below:
Table 8-1 Description Of The DIO Driver Component Files
File
Details
Dio_Cfg.h
This file is generated by the DIO Driver Component Code Generation Tool for DIO
Driver Component pre-compile time parameters. This file contains macro definitions
for the configuration elements. The macros and the parameters generated will vary
with respect to the configuration in the input ARXML file.
Dio_Cbk.h
This file is generated by the DIO Driver Component Code Generation Tool for
Prototype Declarations of Dio callback notification functions.
Dio_Hardware.h
This file is generated by the DIO Generation Tool include declaration of
hardware registers specific to P1x-C DIO
Dio_PBcfg.c
This file contains post-build configuration data. The structures related to DIO
Initialization are provided in this file. Data structures will vary with respect to
parameters configured.
Dio_Lcfg.c
This file contains link-time configuration data. Data structures will vary with
respect to parameters configured.
Dio_Hardware.c
This file is generated by the DIO Generation Tool include definition of
hardware registers specific to P1x-C DIO
Dio.h
This file provides extern declarations for all the DIO Driver Component APIs. This file
provides service Ids of APIs, DET Error codes and Global Data Types for DIO Driver
component. This header file shall be included in other modules to use the features of
DIO Driver Component.
Dio_Debug.h
This file provides Provision of global variables for debugging purpose.
Dio_RegWrite.h
This file is to have macro definitions for the registers write and verification.
Dio_PBTypes.h
This file contains the macros used internally by the DIO Driver Component code
and the structure declarations related to hardware unit registers, HARDWARE unit,
Channel configuration, Group configuration, Group RAM data and HARDWARE unit
RAM data.
Dio_Ram.h
This file contains the extern declarations for the global variables that are defined in
Dio_Ram.c file and the version information of the file.
Dio_Version.h
This file contains the macros of AUTOSAR version numbers of all modules that are
interfaced to DIO.
Dio.c
This file contains the implementation of all DIO Driver Component APIs.
Dio_Version.c
This file contains the code for checking version of all modules that are interfaced to
DIO.
Dio_Ram.c
This file contains the global variables used by DIO Driver Component.
Compiler.h
Provides compiler specific (non-ANSI) keywords. All mappings of keywords, which
are not standardized, and/or compiler specific are placed and organized in this
compiler specific header.
Compiler_Cfg.h
This file contains the memory and pointer classes.
MemMap.h
This file allows to map variables, constants and code of modules to individual
memory sections. Memory mapping can be modified as per ECU specific needs.
Platform_Types.h
This file provides provision for defining platform and compiler dependent types.
32
DIO Driver Component Header And Source File Description Chapter 8
File
Details
rh850_Types.h
This file provides macros to perform supervisor mode (SV) write enabled Register
ICxxx and IMR register writing using OR/AND/Direct operation.
Det.h
This file is a stub for DET Component
Rte.h
This file is a stub for Rte Component
SchM.h
This file is a stub for Schm Component
SchM_Dio.h
Header file information for application.
Dem.h
This file is a stub for DEM component
Dem_cfg.h
This file contains the stub values for Dem_Cfg.h
33
Chapter 8 DIO Driver Component Header And Source File Description
34
Generation Tool Guide Chapter 9
Chapter 9 Generation Tool Guide
For more information on the MCAL Code Generator Tool, please refer
“R20UT3640EJ0102-AUTOSAR.pdf” document.
35
Chapter 9 Generation Tool Guide
36
Application Programming Interface Chapter 10
Chapter 10 Application Programming Interface
This section explains the Data types and APIs provided by the DIO Driver
Component to the Upper layers.
10.1. Imported Types
This section explains the Data types imported by the DIO 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_VersionInfoType
10.1.2. Other Module Types
DIO Driver Component module does not depend on other modules. Hence,
no types from other modules are imported.
10.2. Type Definitions
This section explains the type definitions of DIO Driver Component according
to AUTOSAR Specification.
10.2.1.
Dio_PortType
Name:
Dio_PortType
Type:
uint8
Range:
0 to 255
Description:
Type definition for Dio_PortType used by Dio_ReadPort and Dio_WritePort.
10.2.2.
Dio_ChannelType
Name:
Dio_ChannelType
Type:
uint8
Range:
0 to 255
Description:
Type definition for Dio_ChannelType used by Dio_ReadChannel and Dio_WriteChannel
37
Chapter 10 Application Programming Interface
10.2.3.
Dio_PortLevelType
Name:
Dio_PortLevelType
Type:
uint16
Range:
0 to 65535
Description:
Type definition for Dio_PortLevelType used by Dio_ReadPort, Dio_WritePort,
Dio_ReadChannelGroup and Dio_WriteChannelGroup.
10.2.4.
Dio_ConfigType
Name:
Dio_ConfigType
Type:
Structure
Range:
Implementation specific.
This structure contains all post-build configurable parameters of the DIO driver. A
Description:
pointer to this structure is passed to the DIO driver initialization function for
configuration.
10.3. Function Definitions
This section explains the APIs provided by the DIO Driver Component.
Table 10-1 APIs Used in DIO Driver Component
APIs of R4.0.3
1.
Dio_Init
2.
Dio_ReadPort
3.
Dio_WritePort
4.
Dio_ReadChannel
5.
Dio_WriteChannel
6.
Dio_FlipChannel
7.
Dio_ReadChannelGroup
8.
Dio_WriteChannelGroup
9.
Dio_MaskedWritePort
10.
Dio_GetVersionInfo
38
Application Programming Interface Chapter 10
10.3.1.
Dio_ReadChannel
Name:
Dio_ReadChannel
FUNC(Dio_LevelType, DIO_PUBLIC_CODE)
Prototype:
Dio_ReadChannel(Dio_ChannelType ChannelId)
Service ID:
0x00
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_ChannelType
ChannelId
0-255
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
Dio_LevelType
STD_HIGH The physical level of the corresponding Pin is
STD_HIGH
STD_LOW The physical level of the corresponding Pin is
STD_LOW
Description:
This service returns the va lue of the specified DIO Channel.
Configuration
None
Dependency:
Preconditions:
At least one channel shall be configured for each configured port group. Different values
shall be considered for the configuration parameter DioChannelBitPosition from
DioChannel container
DIO Driver must be initialized.
10.3.2.
Dio_WriteChannel
Name:
Dio_WriteChannel
FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannel
Prototype:
(Dio_ChannelType ChannelId, Dio_LevelType Level)
Service ID:
0x01
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_ChannelType
ChannelId
0-255
Dio_LevelType
Level
0-255
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
None
NA
Description:
This service writes the given value into the specified DIO Channel.
Configuration
None
Dependency:
39
Chapter 10 Application Programming Interface
Preconditions:
At least one channel shall be configured for each configured port group. Different values
shall be considered for the configuration parameter DioChannelBitPosition from
DioChannel container
DIO Driver must be initialized.
10.3.3.
Dio_FlipChannel
Name:
Dio_FlipChannel
FUNC(Dio_LevelType, DIO_PUBLIC_CODE) Dio_FlipChannel(Dio_ChannelType
Prototype:
ChannelId)
Service ID:
0x11
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_ChannelType
Cha
n
n
el
Id
0-
2
5
5
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
Dio_LevelType
STD_HIGH: The physical level of the corresponding
Pin is STD_HIGH.
STD_LOW: The physical level of the corresponding Pin
is STD_LOW.
Description:
This service flip the level of a channel and return the level of the channel after flip.
Configuration
None
Dependency:
Preconditions:
DIO Driver must be initialized.
At least one channel shall be configured for each configured port group. Different
values shall be considered for DioChannelBitPosition configuration parameter
from DioChannel container.
The precompile switch DioFlipChannelApi shall be enabled.
10.3.4.
Dio_ReadPort
Name:
Dio_ReadPort
FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadPort(Dio_PortType PortId)
Prototype:
Service ID:
0x02
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_PortType
PortId
0-255
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
Dio_PortLevelType
Level of all channels of given port
40
Application Programming Interface Chapter 10
Description:
This service returns the level of all channels of given Port.
Configuration
None
Dependency:
Preconditions:
The configuration file shall be contained at least one 16-bit port and one less than 16-bit
port depending upon the availability of ports from the particular controller
DIO Driver must be initialized.
10.3.5.
Dio_WritePort
Name:
Dio_WritePort
FUNC(void, DIO_PUBLIC_CODE) Dio_WritePort
Prototype:
(Dio_PortType PortId, Dio_PortLevelType Level)
Service ID:
0x03
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_PortType
PortId
0-255
Dio_PortLevelType
Level
0-65535
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
None
NA
Description:
This service writes the specified level to all the channels in given Port.
Configuration
None
Dependency:
Preconditions:
The configuration file shall be contained at least one 16-bit port and one less than 16-bit
port depending upon the availability of ports from the particular controller
DIO Driver must be initialized.
10.3.6.
Dio_MaskedWritePort
Name:
Dio_MaskedWritePort
FUNC(void, DIO_PUBLIC_CODE) Dio_MaskedWritePort
Prototype:
(Dio_PortType PortId, Dio_PortLevelType Level, Dio_PortLevelType Mask)
Service ID:
0x13
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_PortType
PortId
0-255
Dio_PortLevelType
Level
0-65535
Dio_PortLevelType
Mask
0-65535
41
Chapter 10 Application Programming Interface
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
None
NA
Description:
This service writes the specified level to all the channels that are Masked in given Port.
Configuration
None
Dependency:
Preconditions:
DIO Driver must be initialized.
The configuration file shall be contained at least one 16-bit port and one less than 16-bit
port depending upon the availability of ports from the particular controller
The precompile switch DioMaskedWritePortApi shall be enabled.
10.3.7.
Dio_ReadChannelGroup
Name:
Dio_ReadChannelGroup
FUNC(Dio_PortLevelType, DIO_PUBLIC_CODE) Dio_ReadChannelGroup
Prototype:
(P2CONST(Dio_ChannelGroupType, DIO_VAR, DIO_CONFIG_CONST)
ChannelGroupIdPtr)
Service ID:
0x04
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_ChannelGroupType ChannelGroupIdPtr
NA
Parameters InOut:
None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
Dio_PortLevelType
Level of a subset of the adjoining bits of a port
Description:
This Service reads a subset of the adjoining bits of a port.
Configuration
None
Dependency:
Preconditions:
DIO Driver must be initialized.
At least one channel group shall be configured for each configured port group.
Different values shall be considered for DioPortMask and DioPortOffset configuration
parameters from DioChannelGroup container.
10.3.8.
Dio_WriteChannelGroup
Name:
Dio_WriteChannelGroup
FUNC(void, DIO_PUBLIC_CODE) Dio_WriteChannelGroup
Prototype:
(P2CONST(Dio_ChannelGroupType, DIO_VAR, DIO_CONFIG_CONST)
ChannelGroupIdPtr, Dio_PortLevelType Level)
Service ID:
0x05
42
Application Programming Interface Chapter 10
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
Dio_ChannelGroupType ChannelGroupI NA
dPtr
Dio_PortLevelType
Level
0-65535
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
None
NA
Description:
This service writes specified level to the ChannelGroup
Configuration
None
Dependency:
Preconditions:
DIO Driver must be initialized.
At least one channel group shall be configured for each configured port group.
Different values shall be considered for DioPortMask and DioPortOffset configuration
parameters from DioChannelGroup container.
10.3.9.
Dio_GetVersionInfo
Name:
Dio_GetVersionInfo
FUNC(void, DIO_PUBLIC_CODE)Dio_GetVersionInfo
Prototype:
(P2VAR(Std_VersionInfoType, AUTOMATIC, DIO_APPL_DATA)versioninfo)
Service ID:
0x12
Sync/Async:
Synchronous
Reentrancy:
Reentrant
Type
Parameter
Value/Range
Parameters In:
None
NA
NA
Parameters InOut: None
NA
NA
Parameters out:
Std_VersionInfoType
versioninfo
Pointer to where to store the version
information of this module.
Type
Possible Return Values
Return Value:
None
NA
Description:
This service flip the level of a channel and return the level of the channel after flip.
Configuration
None
Dependency:
Preconditions:
The precompile switch DioVersionInfoApi shall be enabled.
43
Chapter 10 Application Programming Interface
10.3.10.
Dio_Init
Name:
Dio_Init
FUNC(void, DIO_PUBLIC_CODE) Dio_Init
Prototype:
(P2CONST(Dio_ConfigType, DIO_VAR, DIO_APPL_CONST) ConfigPtr)
Service ID:
0x10
Sync/Async:
Synchronous
Reentrancy:
Non-Reentrant
Type
Parameter
Value/Range
Parameters In:
ConfigPtr
Dio_ConfigType Pointer to post-build configuration data
Parameters InOut: None
NA
NA
Parameters out:
None
NA
NA
Type
Possible Return Values
Return Value:
None
NA
Description:
This service initialize the DIO driver.
Configuration
None
Dependency:
Preconditions:
None
44
Development And Production Errors Chapter 11
Chapter 11 Development And Production Errors
In this section the development errors that are reported by the DIO Driver
Component are tabulated. The development errors will be reported only when
the pre compiler option DIO_DEV_ERROR_DETECT is enabled in the
configuration. The DIO Driver Component does not support any production
errors.
11.1. Dio Driver Component Development Errors
The following contains the DET errors that are reported by DIO Driver
Component. These errors are reported to Development Error Tracer Module
when the DIO Driver Component APIs are invoked with wrong input
parameters or without initialization of the driver.
Table 11-1
DET Errors of DIO Driver Component
Sl. No.
1
Error Code
DIO_E_PARAM_INVALID_CHANNEL_ID
Related APIs
Dio_ReadChannel, Dio_WriteChannel and Dio_FlipChannel
Source of Error
When the above mentioned APIs are invoked with invalid Channel ID
Sl. No.
2
Error Code
DIO_E_PARAM_CONFIG
Related API
Dio_Init
Source of Error
When the above mentioned API is invoked with NULL parameter.
Sl. No.
3
Error Code
DIO_E_PARAM_INVALID_PORT_ID
Related APIs
Dio_ReadPort, Dio_WritePort, Dio_MaskedWritePort, Dio_WriteChannelGroup,
Dio_WriteChannel and Dio_FlipChannel
Source of Error
When the above mentioned APIs are invoked with invalid Port ID
Sl. No.
4
Error Code
DIO_E_PARAM_INVALID_GROUP
Related APIs
Dio_ReadChannelGroup and Dio_WriteChannelGroup
Source of Error
When the above mentioned APIs are invoked with invalid ChannelGroup ID
Sl. No.
5
Error Code
DIO_E_PARAM_POINTER
Related API
Dio_GetVersionInfo, Dio_ReadChannelGroup and Dio_WriteChannelGroup
Source of Error
When the above mentioned API is invoked with the NULL parameter.
Sl. No.
6
Error Code
DIO_E_INVALID_DATABASE
Related API
Dio_Init
Source of Error
When the above mentioned API is called without a database or invalid database
Sl. No.
7
Error Code
DIO_E_UNINIT
45
Chapter 11 Development And Production Errors
Related APIs
Dio_ReadChannel, Dio_WriteChannel, Dio_ReadPort, Dio_WritePort,
Dio_ReadChannelGroup, Dio_WriteChannelGroup, Dio_FlipChannel
and Dio_MaskedWritePort
Source of Error
When the above mentioned APIs are invoked without module initialization.
11.2. Dio Driver Component Production Errors
The following table contains the DEM errors that are reported by DIO
software component.
Sl. No.
1
Error Code
DIO_E_REG_WRITE_VERIFY
Related API(s)
Dio_WritePort, Dio_WriteChannel, Dio_FlipChannel, Dio_WriteChannelGroup,
Dio_MaskedWritePort
Source of Error
When register write-verify fails.
46














Memory Organization Chapter 12
Chapter 12 Memory Organization
Following picture depicts a typical memory organization, which shall be met
for proper functioning of DIO Driver Component software.
ROM Section
RAM Section
DIO Driver Component
Library / Object Files
Global RAM of unspecific size required for
DIO Driver functioning.
Y1
Segment Name:
RAM_UNSPECIFIED
DIO Driver code related to APIs are
placed in this memory.
Global 1- bit RAM to be initialized by start-
Segment Name:
up code.
X1
Y2
DIO_PUBLIC _CODE_ROM
Segment Name:
RAM_1BIT
Global 16- bit RAM to be initialized by start-
up code.
Segment Name:
Y3
NOINIT_RAM_16BIT
Tool Generated File
The const section (other than D IO
Configuration structure) in the file
Dio_PBcfg.c is placed in this memory
Segment Name:
X2
DIO_CFG_DATA_UNSPECIFIED
The const section of DIO Driver is
placed in this memory
Segment Name:
X3
CONST_ROM_UNSPECIFIED
Figure 12-1 DIO Driver Component Memory Organization
47
Chapter 12 Memory Organization
ROM Section (X1, X2 and X3):
DIO_PUBLIC_CODE_ROM (X1): API(s) of DIO Driver Component, which
can be located in code memory.
DIO_CFG_DATA_UNSPECIFIED (X2): This section consists of DIO
Driver Component constant configuration structures. This can be located in
code memory.
CONST_ROM_UNSPECIFIED (X3): The constant section of DIO Driver
Component code that can be located in code memory.
RAM Section (Y1, Y2 and Y3):
RAM_UNSPECIFIED (Y1): This section consists of the global RAM variables
that are initialized by start-up code and used internally by DIO software
component and other software components. The specific sections of
respective software components will be merged into this RAM section
accordingly.
RAM_1BIT (Y2): This section consists of the global RAM variables of 1-bit
size that are initialized by start-up code and used internally by DIO Driver
Component and other software components. The specific sections of
respective software components will be merged into this RAM section
accordingly. This can be located in data memory.
NOINIT_RAM_16BIT (Y3): This section consists of the global RAM variables of
16-bit size that are used internally by DIO Driver Component. This can be
located in data memory.
Notes:
• X1, Y1, Y2 and Y3 pertain to only DIO Driver Component and do not
include memory occupied by Dio_PBcfg.c files generated by DIO Driver
Component Generation Tool.
• User must ensure that none of the memory areas overlap with each other.
Even ‘debug’ information should not overlap.
48
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. Interaction between the User and DIO Driver Component
The details of the services supported by the DIO Driver Component to the
upper layers users and the mapping of the channels to the hardware units is
provided in the following sections:
13.1.1.
Parameter Definition File
Parameter definition files support information for P1x-C
Table 13-1 PDF information for P1x-C
PDF Files
Devices Supported
R403_DIO_P1X-C_70A_71_72.arxml
701370A(CPU1(PE1)), 701371(CPU1(PE1)),
701372(CPU1(PE1))
R403_DIO_P1X-C_73.arxml
701373
R403_DIO_P1X-C_74.arxml
701374
13.2. Sample Application
13.2.1
Sample Application Structure
The Sample Application is provided as reference to the user to understand the
method in which the DIO APIs can be invoked from the application.
Generic
AUTOSAR TYPES
COMPILER
rh850 TYPES
Devices
STUB
P1x-C DIO Sample
Det
Application
Dem
Figure 13-1 Overview of DIO Driver Sample Application
49
Chapter 13 P1x-C Specific Information
The Sample Application of the P1x-C is available in the path
X1X/ P1x-C /modules/dio/sample_application
The Sample Application consists of the following folder structure
X1X/ P1x-C/modules/dio/definition/ AUTOSAR_version /<Subvariant>/
R403_DIO_P1X-C_70A_71_72.arxml
X1X/ P1x-C/modules/dio/definition/ AUTOSAR_version /<Subvariant>/
R403_DIO_P1X-C_73.arxml
X1X/ P1x-C/modules/dio/definition/ AUTOSAR_version /<Subvariant /
R403_DIO_P1X-C_74.arxml
X1X/ P1x-C /modules/dio/sample_application/<Subvariant>
/<AUTOSAR_version>
/src/Dio_PBcfg.c
/src/Dio_Lcfg.c
/inc/Dio_Cfg.h
/inc/Dio_Cbk.h
/config/App_DIO_P1x-C_701370A_Sample.arxml
/config/App_DIO_P1x-C_701372_Sample.arxml
/config/App_DIO_P1x-C_701371_Sample.arxml
/config/App_DIO_P1x-C_701373_Sample.arxml
/config/App_DIO_P1x-C_701374_Sample.arxml
In the Sample Application all the DIO APIs are invoked in the following
sequence:
• The API Dio_GetVersionInfo is invoked to get the version of the DIO
Driver module with a variable of Std_VersionInfoType, after the call of
this API the passed parameter will get updated with the DIO Driver
version details.
• The API Dio_Init is invoked with a valid database address for the
proper initialization of the DIO Driver, all the DIO Driver control
registers and RAM variables will get initialized after this API is called.
• The API Dio_WriteChannel is invoked to set the required level of a
particular channel. It sets the output level of the channel if that particular
channel is configured in output mode. If channel is configured for input
mode, Dio_WriteChannel has no effect.
• The API Dio_ReadChannel reads the actual physical level of the
required channel. The level read for the input channel is actual
physical level of that channel if input buffer for that channel is
enabled. The level read for the output channel is actual physical level
of that channel if bidirectional control for that channel is enabled.
• The API Dio_FlipChannel reads the level of the channel and invert it,
then write the inverted level to the channel if the channel is configured as
output channel and the function shall have no influence on the physical
output if the channel is configured as input channel.
• The API Dio_WritePort is invoked to simultaneously set the required
50
P1x-C Specific Information Chapter 13
levels to all channels of a port. It sets the output level of the channels
which are configured in output mode, for the channels which are
configured in input mode, Dio_WritePort has no effect.
• The API Dio_ReadPort reads the actual physical level of all the port
pins of a required port. The level read for the input port pin is actual
physical level of that port pin if input buffer for that port pin is enabled.
The level read for the output port pin is actual physical level of that
port pin if bidirectional control for that port pin is enabled.
• The API Dio_WriteChannelGroup is invoked to simultaneously set the
required levels to group of channels of a port. It sets the output level
of the channels which are configured in output mode, for the channels
which are configured in input mode, Dio_WriteChannelGroup has no
effect.
• The API Dio_ReadChannelGroup reads the actual physical level of
channel group of a required port. The level read for the input channel group
is actual physical level of that channel group if input buffer for that channel
group is enabled. The level read for the output channel group is actual
physical level of that channel group if bidirectional control for that channel
group is enabled.
• The API Dio_MaskedWritePort provides service to set value of given port
with required mask. The Dio_MaskedWritePort function shall set the
• The specified value for the channel in specified port if the corresponding
bit in mask is ‘1’.
13.2.2 Building Sample Application
13.2.2.1
Configuration Example
This section contains the typical configuration which is used for measuring
RAM/ROM consumption, stack depth and throughput details.
13.2.2.2
Debugging the Sample Application
GNU Make utility version 3.81 or above must be installed and available in the
path as defined by the environment user variable “GNUMAKE” to complete
the build process using the delivered sample files.
Open a Command window and change the current working directory to
“make” directory present as mentioned in below path:
“X1X\P1x-C\common_family\ Sample_Application\<Compiler>”
Now execute batch file SampleApp.bat with following parameters:
SampleApp.bat dio <Device_name>
After this, the tool output files will be generated with the configuration as
mentioned in the path:
“X1X\P1x -C\modules\dio\sample_application\<SubVariant>
\<AUTOSAR_version> \config”
After this, all the object files, map file and the executable file
Sample.out will be available in the output folder (“X1X\P1x-
51
Chapter 13 P1x-C Specific Information
C\modules\dio\sample_application\<SubVariant>\obj\<Compiler>” in
this case).
The executable can be loaded into the debugger and the sample
application can be executed.
13.3. Memory and Throughput
Typical DIO configuration
DET OFF
All other Pre-Compile Settings ON
2 DioPorts
2 DioChannels
2 DioChannelGroups
13.3.1 ROM/RAM Usage
The details of memory usage for the typical configuration provided in Section
Section Typical DIO configuration
Table 13-1 ROM/RAM Details without DET
Sl. No.
ROM/RAM
Segment Name
Size in bytes
for 701372 (CPU1(PE1))
820
DIO_PUBLIC_CODE_ROM
44
1.
ROM
CONST_ROM_UNSPECIFIED
60
DIO_CFG_DATA_UNSPECIFIED
RAM_1BIT
0
-
2
2.
RAM
NOINIT_RAM_16BIT
-
RAM_UNSPECIFIED
4
-
Table 13-2 ROM/RAM Details with DET
Sl. No.
ROM/RAM
Segment Name
Size in bytes
for 701372 (CPU1(PE1))
DIO_PUBLIC_CODE_ROM
1438
1.
ROM
CONST_ROM_UNSPECIFIED
44
DIO_CFG_DATA_UNSPECIFIED
60
RAM_1BIT
1
2.
RAM
2
NOINIT_RAM_16BIT
-
4
RAM_UNSPECIFIED
-
-
52
P1x-C Specific Information Chapter 13
13.3.2 Stack Depth
The worst-case stack depth for DIO Driver Component is 28 bytes for the
typical configuration provided in the Section Typical DIO configuration.
13.3.3 Throughput Details
The throughput details of the APIs with DET disabled for the configuration
mentioned in the Section Typical DIO configuration is as follows. The clock
frequency used to measure the throughput is 160MHz CPU Clock and 80MHZ
PCLK for all APIs.
Table 13-3 Throughput Details of the APIs
Sl. No.
API Name
Throughput in
Remarks
microseconds for
701372
(CPU1(PE1))
1.
Dio_Init
0.250
-
2.
Dio_WriteChannel
1.312
-
3.
Dio_ReadChannel
0.562
-
4.
Dio_WritePort
1.187
-
5.
Dio_ReadPort
0.425
-
6.
Dio_WriteChannelGroup
1.312
-
7.
Dio_ReadChannelGroup
0.525
-
8.
Dio_MaskedWritePort
1.187
-
9.
Dio_FlipChannel
1.475
-
10.
Dio_GetVersionInfo
0.137
-
13.4. Critical Section Details
The critical section throughput details are listed below. The clock frequency used
to measure the throughput is 160MHz for all APIs.
Table 13-4 Critical Section Throughput Details of the APIs
Critical section
Sl. No.
API Name
throughput in
Remarks
microseconds in GHS
for 701372 (CPU1(PE1))
1.
Dio_WritePort
0. 0625
-
2.
Dio_WriteChannel
0. 0655
-
3.
Dio_FlipChannel
0. 064
-
4.
Dio_WriteChannelGroup
0. 0725
-
5.
Dio_MaskedWritePort
0. 0705
-
53
Chapter 13 P1x-C Specific Information
54
Release Details Chapter 14
Chapter 14 Release Details
Embedded DIO Driver Software
Version: 1.0.4
55
Chapter 14 Release Details
56
Revision History
Sl.No.
Description
Version
Date
1.
Initial Version
1.0.0
04-Aug-2015
2.
The following changes are made:
1.0.1
30-Mar-2016
1. Sections13.2.1 is updated for Sample Application configuration
details.
2. R number is added in the last page
3. Added DET error for Dio_GetVersionInfo in Chapter 11
4. Section 13.3 Memory and Throughput updated.
5. Section 4.2 is updated with note about the user Configuration
of Module Short Name.
3.
The following changes are made:
1.0.2
23-Feb-2017
1. Chapter 2, Updated versions of References documents.
2. Chapter 3, section 3.1.1 is updated for new devices.
3. Updated section 4.2 Preconditions.
4. Updated section 4.4 Deviation list.
5. Section 4.5 updated with a note regarding critical section.
6. Table 6-1 in Chapter 6 updated
7. Chapter 8 and Table 8-1 updated with the stub files.
8. Chapter 9, Updated R number
9. Section 13.1 Compiler, Linker and Assembler removed
10. Critical section added in Chapter 13.1
11. Chapter 13.3 ‘Memory and Throughput’ is updated.
12. Updated section 13.2, removed reference to .one and .html
files
13. Updated Chapter 14 ‘Release Details’
14. Chapter 13, Added Processor name along with Device
variants
15. Updated copyright information.
16. Updated section 11.1.
17. Added section 11.2
4.
The following changes are made:
1.0.3
29-May-2017
1. Updated Chapter 12 to remove unused memory section,
DIO_CFG_DBTOC_UNSPECIFIED and added memory
section, CONST_ROM_UNSPECIFIED.
2. Updated Section 13.2.1 and 13.2.2 with latest memory
consumption and stack depth details.
3. Copyright information and notice are changed.
4. Added note in section 4.5
5. Added function definitions of Autosar APIs in section 10.3
6. Added Section 13.1, Interaction between the User and DIO
Driver Component.
7. Path for Parameter definition updated in section 13.2.1.
8. Updated section 13.3.
5.
The following changes are made:
1.0.4
16-Jun-2017
1. Path of the PDF and Sample Application is updated in
section 13.2.
2. Updated section 13.3 with latest memory consumption, stack
depth and throughput details.
3. Updated the R number of the Tool User Manual in Chapter 3
and Chapter 9.
4. Software version in the chapter 14 is updated.
57
AUTOSAR MCAL R4.0.3 User's Manual
DIO Driver Component Ver.1.0.4
Publication Date: Rev.1.02, June 16, 2017
Published by: Renesas Electronics Corporation


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


AUTOSAR MCAL R4.0.3
User’s Manual
R20UT3639EJ0102
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 DIO Driver Component
- Chapter 8 DIO 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
6 - R20UT3640EJ0102-AUTOSAR
7 - R20UT3640EJ0102-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
8 - R20UT3640EJ0102-AUTOSARs



AUTOSAR MCAL R4.0.3
User’s Manual
DIO Driver Component Ver.1.0.4
Generation Tool User’s Manual
Target Device:
RH850/P1x-C
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev.1.02 Jun 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
ECU
Electronic Control Unit
Id
Identifier
MCAL
Microcontroller Abstraction Layer
Dio/DIO
Digital Input Output
XML
eXtensible Mark-up Language
ARXML
AutosaR eXtensible Mark-up Language
Definitions
Terminology
Description
BSWMDT File
This file is the template for the Basic Software Module Description.
ECU Configuration Description
Input file to MCAL Code Generator Tool. ECU Configuration
File
Editor generates it.
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 ......................................................................................... 17
Chapter 5
Output Files ...................................................................................... 19
Chapter 6
Precautions ...................................................................................... 21
Chapter 7
User Configuration Validation ........................................................ 23
Chapter 8
Configuration Overview .................................................................. 25
8.1
Container Overview ............................................................................................................ 25
8.2
Pre-Compile Configurable Parameters ............................................................................. 26
8.3
Post Build Time Configurable Parameters ....................................................................... 27
Chapter 9
Messages.......................................................................................... 31
9.1
Error Messages ................................................................................................................... 31
9.2
Warning Messages ............................................................................................................. 34
9.3
Information Messages ........................................................................................................ 34
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 ....................................................................................................... 25
List of Tables
Table 1-1 Document Overview .............................................................................................................. 9
Table 2-1 Reference Documents ......................................................................................................... 11
Table 5-1 Output Files Description ...................................................................................................... 19
Table 8-1 Pre-Compile Configurable Parameters ............................................................................... 26
Table 8-2 Post Build Time Configurable Parameters .......................................................................... 27
Table 9-1 Parameters and Container related to error ERR_59_120_002........................................... 31
8
Introduction
Chapter 1
Chapter 1 Introduction
The DIO Driver component provides the service for initializing the whole DIO
structure of the microcontroller
The DIO Driver module comprises of two sections as Embedded Software
and the MCAL Code Generator Tool to achieve scalability and configurability.
The document describes the DIO 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 DIO
Driver C Source and C Header files such as Dio_Cfg.h, Dio_Hardware.h,
Dio_Cbk.h, Dio_Lcfg.c, Dio_PBcfg.c and Dio_Hardware.c
This document contains information on the options, input and output files of
the MCAL Code Generator Tool. In addition, this manual covers a step-by-
step procedure for the usage of MCAL Code Generator Tool.
1.1 Document Overview
This user manual is organized as given in the table below:
Table 1-1 Document Overview
Section
Contents
Section 1 (Introduction)
Introduces the document and explains how information is organized in
this manual.
Section 2 (Reference)
Provides a list of documents referred while developing this document.
Section 3 (Code Generation
Provides the Code Generation 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 and details of parameters.
Section 9 (Messages)
Describes all the Error/Warning/Information messages of R4.0.3 which
helps the user to understand the probable reason for
the same.
9
Chapter 1 Introduction
10
Reference
Chapter 2
Chapter 2 Reference
2.1 Reference Documents
The following table lists the documents referred to develop this document:
Table 2-1 Reference Documents
Sl. No. Title
Version
1.
AUTOSAR_SWS_DIODriver.pdf
2.5.0
2.
MCAL_CodeGenerator_Tool_UserManual.pdf
1.7
3.
R20UT3828EJ0101-AUTOSAR.pdf
1.0.3
2.2 Trademark Notice
Microsoft and Windows are trademarks/registered trademarks of Microsoft
Corporation.
11
Chapter 2 Reference
12
Code Generation Overview
Chapter 3
Chapter 3 Code Generation Overview
Overview of Code Generation is shown below.
ECU
Configuration
Description File
and BSWMDT
File
Dio_Cfg.h,
Dio_Cbk.h,
Velocity
Template Files
MCAL Generator
Dio_Hardware.h,
for Dio
Dio_PBcfg.c,
Dio_Lcfg.c,
Dio_Hardware.c
Configuration
XML File
Figure 3-1 Overview of Code Generation
•
ECU Configuration Description File (.arxml):
This file will contain DIO Driver specific configuration
information. This file shall be generated by AUTOSAR specified
Configuration Editor.
•
BSWMDT File (.arxml):
MCAL Code Generator Tool uses “Common Published
Information” from DIO module specific BSWMDT File. DIO
module specific BSWMDT File should not be updated manually
since it is “Static Configuration” file.
•
Velocity template files:
Dio_PBcfg_c, Dio_Cfg_h, Dio_Hardware_h, Dio_Cbk_h,
Dio_Hardware_c, Dio_Lcfg_c, Dio_Validate and
CommonHelper.
The MCAL Code Generator Tool interprets them 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
13
Chapter 3 Code Generation Overview
•
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: Dio_Cfg.h, Dio_Cbk.h, Dio_Hardware.h, Dio_PBcfg.c,
Dio_Lcfg.c and Dio_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.
Concept of execution for MCAL Code Generator Tool
is as follows:
Generation start
Common
Validate
Helper
config.xml
ECU Configur ation
Description
Files
MCAL Code Generator
Template files
And BSWMDT file
Tool
(.arxml)
No
Yes
Validation
successful
Displ ay Error
Generate Output Files
Generation stop
Figure 3-2 Flow Diagram of Code Generation
14
Code Generation Overview
Chapter 3
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.
Dio_Cfg_h / Dio_Cbk_h / Dio_PBcfg_c / Dio_Lcfg_c will generate compiler
switch / structures necessary to the AUTOSAR Configuration chain and
vendor specific parameters.
Dio_Hardware_h / Dio_Hardware_c 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
Getting Started MCAL Drivers X1x User Manual (R20UT3828EJ0101-
AUTOSAR.pdf) for details about the tool command line options.
15
Chapter 3 Code Generation Overview
16
Input Files
Chapter 4
Chapter 4 Input Files
MCAL Code Generator Tool will accept the config.xml file, which has paths
to the Velocity template files for generating Dio Driver files. MCAL Code
Generator Tool need ECU Configuration Description File(s) and BSWMDT
File as inputs to generate Dio Driver specific source files. Hence, ECU
Configuration Description File should contain configuration of DIO 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.
17
Chapter 4 Input Files
18
Output Files
Chapter 5
Chapter 5 Output Files
MCAL Code Generator Tool generates configuration details in C Header and C
Source files (Dio_Cfg.h, Dio_Cbk.h, Dio_PBcfg.c, Dio_Lcfg.c, Dio_Hardware.h
and Dio_Hardware.c).
The content of each output file is given in the table below:
Table 5-1 Output Files Description
Output File
Details
Dio_Cfg.h
This file contains the macro definitions for development error detects, version info API
and channel group. This file contains DIO Channel Configuration Handles, DIO Port
Configuration Handles and DIO Channel Group Configuration Handles.
Dio_PBcfg.c
This file contains Data Structures for DIO Port Group Configuration, DIO Port Channel
Configuration and DIO Port Channel Group Configuration. This file also contains
information on Number of ports and Channels configured.
Dio_Lcfg.c
This file contains Data Structure of DIO Port Channel Group Configuration.
Dio_Hardware.h
This file contains the definitions for addresses of the hardware registers used in the
Dio Driver Module.
Dio_Hardware.c
This file contains the declarations for addresses of the hardware registers used in the
Dio Driver Module.
Dio_Cbk.h
This file contains callback function prototype declarations to be used by application.
Remark Output files generated by MCAL Code Generator Tool should not be
modified or edited manually
19
Chapter 5 Output Files
.
20
Precautions
Chapter 6
Chapter 6 Precautions
• ECU Configuration Description File and BSWMDT File must comply with
AUTOSAR standard for R4.0.3 ECU Configuration Description File and
BSWMDT File respectively.
• The input file must contain DIO 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.
• Configuration XML File should contain the file extension ‘.xml’.
• Configuration XML File: config.xml file should convey the velocity template
file location and output file location
• 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 shall 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 Refer the DIO Component User Manual (R20UT3639EJ0102-
AUTOSAR.pdf) for deviations from AUTOSAR.
21
Chapter 6 Precautions
22
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 MCAL Code Generator Tool. It
ensures conformance of input file with syntax and semantics. It also performs
validation on the input file for correctness of the data.
For more details on list of Error/Warning/Information messages that are
displayed as a result of input file(s) validation, refer Chapter 9 “Messages”.
The MCAL Code Generator Tool displays error or warning or information
when the user has configured incorrect inputs. The format of
Error/Warning/Information message is as shown below.
<message_type>_<vendor_id>_<module_id>_<message_id>:<message_cont
ent>.
where,
<message_type> : ERR/WARNING/INFO
<vendor_id> : vendor Id = 59
<module_id> : 120 - DIO Driver Module id (120) 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 that caused the message is
present.
23
Chapter 7 User Configuration Validation
24





















Configuration Overview
Chapter 8
Chapter 8 Configuration Overview
8.1 Container Overview
The following figure represents container overview
Dio
DioDemEventParamet
DioConfig
DioGeneral
erRefs
DioPort
DioChannel
DioChannelGroup
Figure 8-1 Configuration Overview
25
Chapter 8 Configuration Overview
8.2 Pre-Compile Configurable Parameters
Table 8-1 Pre-Compile Configurable Parameters
Container
Parameter Name
Para
Parameter
Parameter Description
Name
meter
Range
Type
This parameter switches
DioGeneral
DioDevErrorDetect
Boolean
TRUE / FALSE
the Development Error
Detection and Notification
ON or OFF.
Adds / removes the
DioMaskedWritePort
Boolean
TRUE / FALSE
service
Api
Dio_MaskedWritePort()
from the code.
This parameter adds /
DioFlipChannelApi
Boolean
TRUE / FALSE
removes the service
Dio_FlipChannel() from
the code.
Adds / removes the
DioVersionInfoApi
Boolean
TRUE / FALSE
service
Dio_GetVersionInfo() from
the code.
Enable / disable
DioVersionCheckExt
Boolean
TRUE / FALSE
AUTOSAR Version check
ernalModules
for inter-module
dependencies.
This parameter specifies if
TRUE / FALSE
the DIO driver CPU load
can be reduced by
DioCriticalSectionPr
Boolean
disabling the enter/exit
otection
critical section functionality
by adding a precompiled
configuration parameter to
the DIO driver.
R7F701370A,
R7F701371,
This parameter contains
DioDeviceName
Enum
R7F701372,
the supported device
R7F701373,
name.
R7F701374
This parameter
DioWriteVerify
Enum
WV_INIT_RUNTIME
Enable/Disable
WV_DISABLE
Register write verification
service.
This parameter allows the
DioUseWriteVerifyEr
user to generate a user
TRUE / FALSE
rorInterface
Boolean
specific callback function
for Register write
verification service.
DioWriteVerifyErrorI
A User can give a callback
nterface
String
STRING
function name for register
write verification in this
parameter.
26
Configuration Overview
Chapter 8
8.3 Post Build Time Configurable Parameters
Table 8-2 Post Build Time Configurable Parameters
Container
Parameter Name
Parameter
Parameter
Parameter
Name
Type
Range
Description
This value will
DioPort
be assigned to
Numeric identifier of the
the DIO port
DIO port. Not all MCU
DioPortId
Integer
symbolic name.
ports may be used for
DIO, thus there may be
This parameter
"gaps" in the list of all
is not used for
IDs.
implementation.
For
R7F701370A,
R7F701371,
R7F701372
PORTGROUP_
0_BITS_0_TO_
10_13_14,
PORTGROUP_
1_BITS_1_TO_
7,
PORTGROUP_
2_BITS_0_TO_
15,
PORTGROUP_
3_BITS_0_TO_
14,
PORTGROUP_
This parameter specifies
DioPortName
Enum
4_BITS_0_TO_
the DIO port group for a
14,
DIO port.
PORTGROUP_
5_BITS_4_TO_
15_0_1,
PORTGROUP_
6_BITS_0_TO_
15,
PORTGROUP_
7_BITS_0_TO_
9,
PORTGROUP_
8_BITS_0_TO_
15,
PORTGROUP_
9_BITS_0_TO_
8,
PORTGROUPJ
TAG_0_BITS_0
_TO_5
27
Chapter 8 Configuration Overview
Container
Parameter Name
Parameter
Parameter
Parameter
Name
Type
Range
Description
For R7F701373
PORTGROUP_
0_BITS_0_TO_
10_13_14,
PORTGROUP_
1_BITS_1_TO_
7,
PORTGROUP_
2_BITS_0_TO_
15,
PORTGROUP_
3_BITS_0_TO_
14,
PORTGROUP_
4_BITS_0_TO_
14,
PORTGROUP_
5_BITS_4_TO_
15_0_1,
PORTGROUP_
6_BITS_0_TO_
6_10_11_12_13
,
PORTGROUP_
7_BITS_0_TO_
5,
PORTGROUP_
9_BITS_7_8,
PORTGROUPJ
TAG_0_BITS_0
_TO_5
For R7F701374
28
Configuration Overview
Chapter 8
Container
Parameter Name
Parameter
Parameter
Parameter
Name
Type
Range
Description
PORTGROUP_
0_BITS_0_TO_
10_13_14,
PORTGROUP_
1_BITS_1_TO_
4,
PORTGROUP_
2_BITS_0_TO_
15,
PORTGROUP_
3_BITS_0_TO_
14,
PORTGROUP_
4_BITS_0_TO_
14,
PORTGROUP_
5_BITS_4_TO_
15_0_1,
PORTGROUP_
6_BITS_0_TO_
3,
PORTGROUPJ
TAG_0_BITS_0
_TO_5
This value will
DioChann
be assigned to
el
the symbolic
DioChannelId
Integer
names.
Channel Id of the DIO
channel
This parameter
is not used for
implementation.
DioChannelBitPositio
This parameter contains
Integer
0-15
n
channel bit position of the
DIO channel.
The DIO channel group is
DioChann
identified in DIO API by a
elGroup
This parameter
pointer to a data structure
DioChannelGroupIde
String
is not used for
(of type
ntification
implementation.
Dio_ChannelGroupType).
That data structure
contains the channel
group information.
This shall be the mask,
DioPortMask
Integer
0-65535
which defines the
positions of the channel
group.
The position of the
Channel Group on the
DioPortOffset
Integer
0-15
port, counted from the
LSB. This value can be
derived from
DioPortMask.
Reference to the
DioDemEventParam
DioDemEv
Reference to
DemEventParameter
eterRefs
entParame
Reference
DemEventId of
which shall be issued
terRefs
Dem module.
when the error "DIO
register write verification
29
Chapter 8 Configuration Overview
Container
Parameter Name
Parameter
Parameter
Parameter
Name
Type
Range
Description
failed (HW)" has
occurred.
30
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_120_001: Parsing of Dio module is incorrect.
This error will occur when the parameter passed is not for Dio module.
ERR_59_120_002: The parameter ‘parameter name’ in the container ‘container
name’ shall be configured.
This error will occur, if any of the mandatory configuration parameter(s) mentioned
below is (are) not configured in ECU Configuration Description File.
Table 9-1 Parameters and Container related to error ERR_59_120_002
Container
Parameters
DioPort
DioPortName
DioChannel
DioChannelBitPosition
DioPortMask
DioChannelGroup
DioPortOffset
Note: DioChannel and DioChannelGroup containers are optional container. If these containers
are configured, then respective parameters from above table are mandatory.
ERR_59_120_003: The value <value for DioPortName> configured for the
parameter ‘DioPortName’ present in the container ‘DioPort’ shall be unique.
This error will occur, if the Parameter DioPortName is configured with same value
more than once in a configset.
ERR_59_120_004: The value for parameter ‘DioChannelBitPosition’ present in
the container ‘DioChannel’ of the DIO port group <value for DioPortName
parameter> is not in the range of <Start> and <End>.
This error will occur, if the value for parameter DioChannelBitPosition present in the
container DioChannel for respective DIO port group is not valid as configured channel
bit position must belongs to the respective DIO port group. In above error message,
<Start> and <End> will be replaced by ‘start channel bit position’ and ‘end channel bit
position’ respectively for selected DIO port group.
Example: Suppose in PORTGROUP_2_BITS_0_TO_2, only 0 to 2 channels are
available. If user configures channels, which does not belong to
PORTGROUP_2_BITS_0_TO_2 then it is invalid configuration. Here start is 0 and end
is 2.
31
Chapter 9 Messages
ERR_59_120_005: The value <value for DioChannelBitPosition> configured for
the parameter ‘DioChannelBitPosition’ present in the container ‘DioChannel’ of
the DIO port group <value for DioPortName parameter> shall be unique.
This error will occur, if the value for parameter DioChannelBitPosition present in the
container DioChannel is not unique for respective DIO port group configured for the
parameter DioPortName.
ERR_59_120_006: The value for parameter ‘DioPortMask’ <value for the
DioPortMask> present in the container ‘DioChannelGroup’ of the DIO port group
<value for DioPortName parameter> is not valid.
This error will occur, if value for parameter DioPortMask present in the container
DioChannelGroup for respective DIO port group is not valid as the grouped channels
must belong to the respective DIO port group.
Example: Suppose in PORTGROUP_2_BITS_0_TO_2, only 0 to 2 channels are
available. In this case, user should not consider channel 3 and channel 4 in channel
grouping, since channel 3 and channel 4 does not belong to
PORTGROUP_2_BITS_0_TO_2.
ERR_59_120_007: The number of ‘DioChannelGroup’ container is not same
across multiple configuration sets.
This error will occur, if the number of DioChannelGroup container is not same across
multiple configuration sets
ERR_59_120_008: The value for parameter ‘DioPortOffset’ <value for the
DioPortOffset> present in the container ‘DioChannelGroup’ of the DIO port
group <value for DioPortName parameter> is not valid. The value of the
parameter ‘DioPortOffset’ shall be equal to the start position of the DIO channel
group.
This error will occur, if the value for parameter DioPortOffset present in the container
DioChannelGroup is not valid. The value of the parameter DioPortOffset shall be equal
to the start position of the DIO channel group.
Example: Suppose DIO channel grouping started from Channel 2 then value for
parameter DioPortOffset shall be 2.
ERR_59_120_009: The short name <short name for DioPort> configured for the
container ‘DioPort’ shall be unique.
This error will occur, if short name of the container DioPort is not unique in ECU
Configuration Description File.
ERR_59_120_010: The short name <short name for DioChannel> configured for
the container ‘DioChannel’ shall be unique.
This error will occur, if short name of the container DioChannel is not unique in each
DioPort container.
ERR_59_120_011: The short name <short name for DioChannelGroup>
configured for the container ‘DioChannelGroup’ shall be unique.
This error will occur, if short name of the container DioChannelGroup is not unique in
each DioPort container.
ERR_59_120_012: The number of ‘DioPort’ container is not same across
multiple configuration sets.
This error will occur, if the number of DioPort container is not same across multiple
configuration sets.
ERR_59_120_013: The number of ‘DioChannel’ container is not same across
multiple configuration sets.
32
Messages
Chapter 9
This error will occur, if the number of DioChannel container is not same across
multiple configuration sets.
ERR_59_120_014: The number of ‘DioChannelGroup’ container is not same
across multiple configuration sets.
This error will occur, if the number of DioChannelGroup container is not same across
multiple configuration sets.
ERR_59_120_015: DioWriteVerifyErrorInterface should have a valid error
notification, since the value of the parameter DioWriteVerify is
<WV_INIT_RUNTIME> and the parameter DioUseWriteVerifyErrorInterface is
configured as true.
This error will occur if there is no valid error notification configured for the parameter
DioUseWriteVerifyErrorInterface when write-verify check is enabled.
ERR_59_120_016: DioUseWriteVerifyErrorInterface parameter should not be
configured as true in DioGeneral Container, since the value of DioWriteVerify is
<WV_DISABLE>
This error will occur when the parameter DioUseWriteVerifyErrorInterface is configured
as true, when the write-verify check is disabled.
ERR_59_120_017: The reference path <path> provided for the parameter
'DIO_E_REG_WRITE_VERIFY’ within the container ‘DioDemEventParameterRefs’
is incorrect.
This error will occur, if the path provided for the parameter
DIO_E_REG_WRITE_VERIFY in the container DioDemEventParameterRefs is
incorrect.
ERR_59_120_018: The reference parameter 'DIO_E_REG_WRITE_VERIFY' of the
container 'DioDemEventParameterRefs' shall be configured, since the value of
the parameter 'DioWriteVerify' of the container 'DioGeneral' is configured as
<WV_INIT_RUNTIME>.
This error will occur, if there is no path provided for parameter
DIO_E_REG_WRITE_VERIFY
ERR_59_120_019: The error notification configured for the parameter
'DioWriteVerifyErrorInterface' should follow C syntax <[a-z A-Z][a-z A-Z 0-9_]>
This error will occur if the parameter DioWriteVerifyErrorInterface in container
DioGeneral0 does not follow C syntax <[a-zA-Z][a-zA-Z0-9_]>.
ERR_59_120_020: The container short name of ‘DioChannel’ container is not
same across multiple configuration sets.
This error will occur, if the container short name of DioChannel container is not same
across multiple configuration sets.
ERR_59_120_021: The variant is not supported currently.
This error occurs when the parameter 'DioDeviceName' in the General container is
configured other than the supported devices.
ERR_59_120_022: The error notification configured for the parameter
'DioWriteVerifyErrorInterface' should not be $ErrInterface, since the value of the
parameter 'DioWriteVerify' of the container 'DioGeneral' is configured as
<WV_INIT_RUNTIME>.
This error will occur if error notification configured as NULL/NULL_PTR for the
parameter DioUseWriteVerifyErrorInterface when write-verify check is enabled.
33
Chapter 9 Messages
ERR_59_120_023: The container DioGeneral0 shall be configured
This error occur if the container DioGeneral0 is not configured.
ERR_59_120_1001: The specified AR-PACKAGE Name not found in description
file
This error will occur, if Specified AR-PACKAGE Name not found in description file
ERR_59_100_1008: The parameter DioDevErrorDetect in the DioGeneral0
Container is not configured.
This error will occur, if the parameter DioDevErrorDetect in the DioGeneral0 Container
is not configured.
9.2 Warning Messages
None
9.3 Information Messages
None
34
Revision History
Sl. No. Description
Version
Date
1.
Initial Version
1.0.0
04-Aug-2015
2.
The following changes are made:
1.0.1
30-Mar-2016
1. R number is added in the last page
2. Added parameter DioCriticalSectionProtection in Figure 8-1
Configuration overview.
3. Added parameter DioCriticalSectionProtection in 8.2 Pre-
Compile Configurable Parameters.
4. Added error message ERR_59_120_009 in 10.1.1 Error
Messages
5. Description added for error messages in 10.1.1 Error
Messages
6. Compiler version updated in 9.3 User Environment Settings
3
The following changes are made:
1.0.2
23-Feb-2017
1. Chapter 1, Updated Introduction.
2. Section 2.1, Updated reference document details.
Chapter 5, Updated description of output files.
3. Chapter 6, Added one more point in precautions.
4. Section 8.2, Updated Pre-Compile Configurable Parameters
5. Section 8.3, Updated Post Build Time Configurable
Parameters
6. Chapter 9.1.1, Modified Error messages ERR_59_120_001 to
ERR_59_120_009 and added ERR_59_120_010 to
ERR_59_120_022
7. Chapter 7, Updated the format of Error/Warning/Information
message.
8. Chapter 4, Updated description of Input files.
9. Updated Chapters 1,3,4,5,6,7 by rephrasing Tool and DIO
Driver Generation Tool with MCAL Code Generator Tool
10. Removed Chapter 9 Generation Tool Options, Chapter-10
Notes.
11. Chapter 3, Added remark for common MCAL Code Generator
Tool user manual.
12. Figure 3-2 is renamed from Flow-Diagram of MCAL Code
Generator Tool to Flow-Diagram of Code Generation
13. Chapter 3, Updated Figure 3-2 Flow-Diagram of Code
Generation
14. Chapter 3, Renamed chapter name MCAL Code Generator
Tool Overview to Code Generation Overview
15. Removed parameters from Figure 8-1, Configuration Overview
16. Updated copyright year.
4
The follo wing changes are made:
1.0.3
23-May-2017
1. Added details of Error message ERR_59_120_023 in section
9.1
2. Copyright details and notice are changed.
3. Modified Table 8-2 to update values of the parameter
DioPortName.
4. Added ERR_59_120_1001 and ERR_59_120_1008 in section
9.1.
5. Chapter 3, Removed extension.vm from Velocity template
files.
5
1. Updated Table 8-1 to change the parameter type and
1.0.4
16-Jun-2017
parameter range of the parameter DioWriteVerify.
2. Updated R number of the Component User Manual in
Chapter 6.
35
AUTOSAR MCAL R4.0.3 User's Manual
DIO Driver Component Ver.1.0.4
Generation Tool User's Manual
Publication Date: Rev 1.02, June 16, 2017
Published by: Renesas Electronics Corporation


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


AUTOSAR MCAL R4.0.3
User’s Manual
R20UT3640EJ0102
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