Professional Documents
Culture Documents
Document Title
Document Owner
Document Responsibility
Document Identification No
Document Classification
AUTOSAR
AUTOSAR
040
Standard
Document Status
Part of AUTOSAR Release
Final
4.2.2
4.2.1
4.1.2
4.1.1
AUTOSAR
Release
Management
AUTOSAR
Release
Management
AUTOSAR
Administration
4.0.3
AUTOSAR
Administration
3.1.5
AUTOSAR
Administration
Change Description
Rephrased SWS_Port_00077,
SWS_Port_00087, SWS_Port_00087,
SWS_Port_00223
Editorial changes on Chapter 7
Remove SWS_Port_0105
Replace PORT_E_PARAM_CONFIG by
PORT_E_INIT_FAILED
Editorial changes
Editorial changes
Removed chapter(s) on change documentation
PORT_E_UNINIT removed from
Port_GetVersionInfo API
Header file structure: MemMap.h changed to
Port_MemMap.h and EcuM.h removed
Changed scope of configuration parameters
from module to "local"
Removal of specification items covered by the
new SWS BSW General
Formal rework
Removed Port132 and updated Figure 1
Rephrased SWS_Port_00114 and
SWS_Port_00075
Removed Port210
Added Chapter 12
A lot of requirements are changed to make them
atomic or /and more clear. No technical content
changes. Look Chapter 14 for the complete list.
Debugging Concept Inserted.
Insertion of the new configuration parameter to
enable or disable the mode of the port pins at
run time.
Checking of Port_GetVersionInfo.
Legal disclaimer revised
1 of 42
- AUTOSAR confidential -
AUTOSAR
Administration
AUTOSAR
Administration
AUTOSAR
Administration
Change Description
Updated document to new SWS macros and
updated links to generated content
Legal disclaimer revised
Table formatting corrected
2.1.15
AUTOSAR
Administration
2.0
1.0
AUTOSAR
Administration
AUTOSAR
Administration
2 of 42
- AUTOSAR confidential -
Disclaimer
This specification and the material contained in it, as released by AUTOSAR, is for
the purpose of information only. AUTOSAR and the companies that have contributed
to it shall not be liable for any use of the specification.
The material contained in this specification is protected by copyright and other types
of Intellectual Property Rights. The commercial exploitation of the material contained
in this specification requires a license to such Intellectual Property Rights.
This specification may be utilized or reproduced without any modification, in any form
or by any means, for informational purposes only. For any other purpose, no part of
the specification may be utilized or reproduced, in any form or by any means, without
permission in writing from the publisher.
The AUTOSAR specifications have been developed for automotive applications only.
They have neither been developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Advice for users
AUTOSAR specifications may contain exemplary items (exemplary reference
models, "use cases", and/or references to exemplary technical solutions, devices,
processes or software).
Any such exemplary items are contained in the specifications for illustration purposes
only, and they themselves are not part of the AUTOSAR Standard. Neither their
presence in such specifications, nor any later documentation of AUTOSAR
conformance of products actually implementing such exemplary items, imply that
intellectual property rights covering such exemplary items are licensed under the
same rules as applicable to the AUTOSAR Standard.
3 of 42
- AUTOSAR confidential -
Table of Contents
1
Related documentation........................................................................................ 8
3.1
3.2
3.3
Limitations ..................................................................................................... 9
Applicability to car domains ........................................................................... 9
4 of 42
- AUTOSAR confidential -
10
10.1
How to read this chapter .......................................................................... 33
10.2
Containers and configuration parameters ................................................ 33
10.2.1
Variants ............................................................................................. 33
10.2.2
Port .................................................................................................... 33
10.2.3
PortContainer .................................................................................... 34
10.2.4
PortGeneral ....................................................................................... 35
10.2.5
PortPin ............................................................................................... 37
10.2.6
PortConfigSet .................................................................................... 41
10.3
Published Information............................................................................... 42
11
5 of 42
- AUTOSAR confidential -
Driver
Name for
a Port Pin
Name for
a whole
port
Channel
Name for
Subset of
Adjacent pins
on one port
Channel Group
DIO Driver
PORT Driver
Port pin
--
Port
Port
6 of 42
- AUTOSAR confidential -
IO HW
Abstraction
Software
I/O HW Abstraction
Driver Functions
MCAL
Software
DIO_WriteChannel
PORT_Init
DIO_ReadPort
PORT Driver
DIO Driver
PORT_Config
DIO_WriteGroup
On-Chip
Registers
On-Chip
Hardware
Port Function
Processor Specific
Processor Specific
Port Direction
PORT
PIN0
PIN1
PIN2
PIN3
PIN...
PINn
7 of 42
- AUTOSAR confidential -
Description:
Diagnostic Event Manager
Default Error Tracer
MicroController Unit
Represents a single configurable input or output pin on an MCU device.
Represents a whole configurable port on an MCU device.
Two states are possible: LOW/HIGH
Two states are possible: LOW/HIGH
3 Related documentation
3.1 Input documents
[1] List of Basic Software Modules,
AUTOSAR_TR_BSWModuleList.pdf
[2] Layered Software Architecture,
AUTOSAR_EXP_LayeredSoftwareArchitecture.pdf
[3] General Requirements on Basic Software Modules,
AUTOSAR_SRS_BSWGeneral.pdf
[4] Specification of Default Error Tracer,
AUTOSAR_SWS_DefaultErrorTracer.pdf
[5] Specification of ECU Configuration,
AUTOSAR_TPS_ECUConfiguration.pdf
[6] Specification of Diagnostic Event Manager,
AUTOSAR_SWS_DiagnosticEventManager.pdf
[7] Specification of ECU State Manager,
AUTOSAR_SWS_ECUStateManager.pdf
[8] General Requirements on SPAL,
AUTOSAR_SRS_SPALGeneral.pdf
[9] Requirements on PORT driver,
AUTOSAR_SRS_PORTDriver.pdf
8 of 42
- AUTOSAR confidential -
It is the users responsibility to ensure that the same Port/Port pin is not being
accessed in parallel by different entities in the same system, e.g. by two tasks
configuring the same port or two tasks configuring the same pin, or two tasks
configuring different pins on the same port.
- AUTOSAR confidential -
(SRS_BSW_00383, SRS_BSW_00384)
[SWS_Port_00130] Port.h shall include Port_Cfg.h for the API pre-compiler
switches and Std_Types.h ( )
[SWS_Port_00131] Port.c shall include Port.h, Port_MemMap.h, Det.h,
SchM_Port.h
(see
SWS_Port_00114
(SRS_BSW_00435, SRS_BSW_00436)
for
inclusion
checking).
- AUTOSAR confidential -
6 Requirements traceability
This chapter refers to the input requirements specified in the SRS documents
(Software Requirements Specifications) that are applicable for this software module.
The table below lists the specification items of the PORT driver SWS document that
satisfy the input requirements. Only functional requirements are referenced.
Requirement
Description
Satisfied by
SWS_Port_00013
SWS_Port_00046
SWS_Port_00054
SWS_Port_00055
SWS_Port_00066
SWS_Port_00071
SWS_Port_00073
SWS_Port_00076
SWS_Port_00078
SWS_Port_00081
11 of 42
- AUTOSAR confidential -
SWS_Port_00082
SWS_Port_00124
SWS_Port_00125
SWS_Port_00128
SWS_Port_00129
SWS_Port_00130
SWS_Port_00133
SWS_Port_00137
SWS_Port_00141
SWS_Port_00142
SWS_Port_00143
SWS_Port_00145
SWS_Port_00146
SWS_Port_00147
SWS_Port_00148
SWS_Port_00204
SWS_Port_00205
SWS_Port_00207
SWS_Port_00208
SWS_Port_00212
SWS_Port_00213
SWS_Port_00219
SWS_Port_00220
SWS_Port_00221
SWS_Port_00223
SWS_Port_00225
SWS_Port_00228
SWS_Port_00229
SWS_Port_00230
SWS_Port_00231
BSW00420
SWS_Port_00227
BSW00421
SWS_Port_00227
BSW00431
SWS_Port_00227
BSW00434
SWS_Port_00227
BSW12423
SWS_Port_00075
- AUTOSAR confidential -
SWS_Port_00227
SWS_Port_00001,
SWS_Port_00002,
SWS_Port_00041,
SWS_Port_00042
SWS_Port_00004
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
- AUTOSAR confidential -
SWS_Port_00227
SWS_Port_00051
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00051
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SRS_BSW_00355 -
SWS_Port_00227
SWS_Port_00140
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
14 of 42
- AUTOSAR confidential -
SWS_Port_00227
SWS_Port_00227
SRS_BSW_00376 -
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00080
SWS_Port_00051
SRS_BSW_00387 -
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00041
SWS_Port_00227
SWS_Port_00121
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
15 of 42
- AUTOSAR confidential -
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SRS_BSW_00435 -
SWS_Port_00131
SRS_BSW_00436 -
SWS_Port_00131
SWS_Port_00227
SWS_Port_00227
SWS_Port_00004,
SWS_Port_00072,
SWS_Port_00079
SRS_Port_12300
SWS_Port_00005
SRS_Port_12302
SWS_Port_00006
SRS_Port_12405
SWS_Port_00063,
SWS_Port_00086,
SWS_Port_00138
SRS_Port_12406
SWS_Port_00060,
SWS_Port_00061
SWS_Port_00227
SWS_Port_00227
SWS_Port_00041,
SWS_Port_00042,
SWS_Port_00043
SWS_Port_00227
16 of 42
- AUTOSAR confidential -
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00227
SWS_Port_00041,
SWS_Port_00042
SWS_Port_00227
SWS_Port_00003
SWS_Port_00227
SWS_Port_00041
SWS_Port_00227
SWS_Port_00227
SWS_Port_00113,
SWS_Port_00214,
SWS_Port_00215,
SWS_Port_00217,
SWS_Port_00218
SWS_Port_00227
SWS_Port_00227
17 of 42
- AUTOSAR confidential -
7 Functional specification
7.1 General Behaviour
shall
provide
additional
[SWS_Port_00082] The PORT Driver module shall not provide the facility to
configure pin level inversion. The default value shall be set (i.e. not inverted). ( )
18 of 42
- AUTOSAR confidential -
- AUTOSAR confidential -
Value [hex]
PORT_E_PARAM_PIN
0x0A
PORT_E_DIRECTION_UNCHANGEABLE 0x0B
PORT_E_INIT_FAILED
0x0C
PORT_E_PARAM_INVALID_MODE
PORT_E_MODE_UNCHANGEABLE
0x0D
0x0E
PORT_E_UNINIT
0x0F
PORT_E_PARAM_POINTER
0x10
- AUTOSAR confidential -
Function
Error
Condition
Port_SetPinDirection
PORT_E_PARAM_PIN
PORT_E_DIRECTION_UNCHANGEABLE
Port_Init
Port_SetPinMode
PORT_E_INIT_FAILED
PORT_E_PARAM_PIN
PORT_E_PARAM_INVALID_MODE
21 of 42
- AUTOSAR confidential -
Port_SetPinDirection,
Port_SetPinMode
Port_RefreshPortDirection
Port_GetVersionInfo
Port_SetPinMode
service called
when the mode is
unchangeable
API service
called prior to
module
initialization
Api called with a
NULL Pointer
Parameter
PORT_E_MODE_UNCHANGEABLE
PORT_E_UNINIT
PORT_E_PARAM_POINTER
8 API specification
8.1 Imported types
In this chapter, all types included from the following files are listed:
[SWS_Port_00129]
Module
Dem
Std_Types
Imported Type
Dem_EventIdType
Dem_EventStatusType
Std_ReturnType
Std_VersionInfoType
()
8.2.1 Port_ConfigType
[SWS_Port_00228]
Name:
Type:
Range:
Description:
Port_ConfigType
Structure
Hardware
The contents of the initialization data structure are specific to
Dependent
the microcontroller.
Structure
Type of the external data structure containing the initialization data for this module.
()
22 of 42
- AUTOSAR confidential -
8.2.2 Port_PinType
[SWS_Port_00229]
Name:
Type:
Range:
Description:
Port_PinType
uint
0 - <number of -- Shall cover all available port pins. The type should be
port pins:>
chosen for the specific MCU platform (best performance).
Data type for the symbolic name of a port pin.
()
[SWS_Port_00013] The type Port_PinType shall be used for the symbolic
name of a Port Pin. ( )
[SWS_Port_00219] The type Port_PinType shall be uint8, uint16 or uint32
based on the specific MCU platform. ( )
Note: The user shall use the symbolic names provided by the configuration tool.
23 of 42
- AUTOSAR confidential -
Port_PinDirectionType
Enumeration
PORT_PIN_IN
Sets port pin as input.
PORT_PIN_OUT
Sets port pin as output.
Possible directions of a port pin.
()
[SWS_Port_00046] The type Port_PinDirectionType is a type for defining
the direction of a Port Pin. ( )
[SWS_Port_00220] The type Port_PinDirectionType shall be of enumeration
type having range as PORT_PIN_IN and PORT_PIN_OUT. ( )
8.2.4 Port_PinModeType
[SWS_Port_00231]
Name:
Type:
Range:
Description:
Port_PinModeType
uint
Implementation - As several port pin modes shall be configurable on one pin,
specific
- the range shall be determined by the implementation.
Different port pin modes.
()
[SWS_Port_00124] A port pin shall be configurable with a number of port pin
modes (type Port_PinModeType). ( )
[SWS_Port_00212] The type Port_PinModeType shall be used with the function
call Port_SetPinMode (see Section 8.3.5). ( )
[SWS_Port_00221] The type Port_PinModeType shall be uint8, uint16 or uint32.
()
Port_Init
void Port_Init(
24 of 42
- AUTOSAR confidential -
Service ID[hex]:
Sync/Async:
Reentrancy:
Parameters (in):
Parameters
(inout):
Parameters (out): None
Return value:
None
Description:
Initializes the Port Driver module.
(SRS_BSW_00358)
[SWS_Port_00041] The function Port_Init shall initialize ALL ports and port
pins with the configuration set pointed to by the parameter ConfigPtr.
(SRS_BSW_00101, SRS_BSW_00404, SRS_SPAL_12263, SRS_SPAL_12057, SRS_SPAL_12125)
[SWS_Port_00078] The Port Driver modules environment shall call the function
Port_Init first in order to initialize the port for use. ( )
[SWS_Port_00213] If Port_Init function is not called first, then no operation can
occur on the MCU ports and port pins. ( )
[SWS_Port_00042] The function Port_Init shall initialize all configured
resources. (SRS_BSW_00101, SRS_SPAL_12057, SRS_SPAL_12125)
The function Port_Init shall apply the following rules regarding initialisation of
controller registers.
shall
be
initialised
25 of 42
by
the
startup
code.
- AUTOSAR confidential -
- AUTOSAR confidential -
Service ID[hex]:
Sync/Async:
Reentrancy:
Parameters (in):
Port_SetPinDirection
void Port_SetPinDirection(
Port_PinType Pin,
Port_PinDirectionType Direction
)
0x01
Synchronous
Reentrant
Pin
Port Pin ID number
Direction
Port Pin Direction
None
Parameters
(inout):
Parameters (out): None
Return value:
None
Description:
Sets the port pin direction
()
[SWS_Port_00063] The function Port_SetPinDirection shall set the port pin
direction during runtime. (SRS_Port_12405)
[SWS_Port_00054] The function Port_SetPinDirection shall be re-entrant if
accessing different pins independent of a port. ( )
[SWS_Port_00086] The function Port_SetPinDirection shall only be
available to the user if the pre-compile parameter PortSetPinDirectionApi is
set to TRUE. If set to FALSE, the function Port_SetPinDirection is not
available. (see also section 8.3.2. (SRS_Port_12405)
Configuration of Port_SetPinDirection: All ports and port pins shall be
configured by the configuration tool. See PORT117.
8.3.3 Port_RefreshPortDirection
[SWS_Port_00142]
Service name:
Syntax:
Port_RefreshPortDirection
void Port_RefreshPortDirection(
void
)
0x02
Synchronous
Non Reentrant
None
None
Service ID[hex]:
Sync/Async:
Reentrancy:
Parameters (in):
Parameters
(inout):
Parameters (out): None
27 of 42
- AUTOSAR confidential -
None
Refreshes port direction.
()
[SWS_Port_00060] The function Port_RefreshPortDirection shall refresh
the direction of all configured ports to the configured direction
(PortPinDirection). (SRS_Port_12406)
[SWS_Port_00061] The function Port_RefreshPortDirection shall exclude
those port pins from refreshing that are configured as pin direction changeable
during runtime. (SRS_Port_12406)
The configuration tool shall provide names for each configured port pin.
8.3.4 Port_GetVersionInfo
[SWS_Port_00143]
Service name:
Syntax:
Port_GetVersionInfo
void Port_GetVersionInfo(
Std_VersionInfoType* versioninfo
)
0x03
Synchronous
Reentrant
None
None
Service ID[hex]:
Sync/Async:
Reentrancy:
Parameters (in):
Parameters
(inout):
Parameters (out): versioninfo Pointer to where to store the version information of this module.
Return value:
None
Description:
Returns the version information of this module.
()
[SWS_Port_00225] if Det is enabled, the parameter versioninfo shall be
checked for being NULL. The error PORT_E_PARAM_POINTER shall be reported in
case the value is a NULL pointer. ( )
8.3.5 Port_SetPinMode
[SWS_Port_00145]
Service name:
Syntax:
Service ID[hex]:
Sync/Async:
Reentrancy:
Port_SetPinMode
void Port_SetPinMode(
Port_PinType Pin,
Port_PinModeType Mode
)
0x04
Synchronous
Reentrant
28 of 42
- AUTOSAR confidential -
Parameters (in):
Pin
Mode
None
Parameters
(inout):
Parameters (out): None
Return value:
None
Description:
Sets the port pin mode.
()
[SWS_Port_00125] The function Port_SetPinMode shall set the port pin mode
of the referenced pin during runtime. ( )
[SWS_Port_00128] The function Port_SetPinMode shall be re-entrant if
accessing different pins, independent of a port. ( )
[SWS_Port_00223] If Det is enabled, the function Port_SetPinMode shall report
PORT_E_MODE_UNCHANGEABLE error and return without any other action, if the
parameter PortPinModeChangeable is set to FALSE. ( )
Configuration of Port_SetPinMode: All ports and port pins shall be configured by
the configuration tool. See PORT117.
29 of 42
- AUTOSAR confidential -
Det_ReportError
Description
Queues the reported events from the BSW modules (API is only used
by BSW modules). The interface has an asynchronous behavior,
because the processing of the event is done within the Dem main
function.
OBD Events Suppression shall be ignored for this computation.
Service to report development errors.
()
8.6.3 Configurable Interfaces
None
9 Sequence diagrams
9.1 Overall Configuration of Ports
module
User
Port
Port_Init(const
Port_ConfigType*)
Port_Init()
30 of 42
- AUTOSAR confidential -
User
Port
Port_SetPinDirection(Port_PinType,
Port_PinDirectionType)
Port_SetPinDirection()
module
User
Port
Port_RefreshPortDirection()
Port_RefreshPortDirection()
31 of 42
- AUTOSAR confidential -
Generic
Elements::User
Port::Port
Port_SetPinMode(Pin,Mode)
Port_SetPinMode
Description:
Set the mode of a port pin
Comments:
32 of 42
- AUTOSAR confidential -
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification Chapter 10.1 describes
fundamentals. It also specifies a template (table) you shall use for the parameter
specification. We intend to leave Chapter 10.1 in the specification to guarantee
comprehension.
Chapter 10.2 specifies the structure (containers) and the parameters of the module
PORT
Chapter 10.3 specifies published information of the module PORT.
PortConfigSet
33 of 42
- AUTOSAR confidential -
PortGeneral
Port :EcucModuleDef
+container
upperMultiplicity = 1
lowerMultiplicity = 0
PortGeneral :
EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 1
10.2.3 PortContainer
SWS Item
Container Name
Description
Configuration Parameters
ECUC_Port_00122 :
PortContainer
Container collecting the PortPins.
SWS Item
Name
Description
Multiplicity
Type
Range
Default value
Post-Build Variant Value
Value Configuration Class
ECUC_Port_00124 :
PortNumberOfPortPins
false
Scope / Dependency
Pre-compile time
Link time
Post-build time
scope: local
Included Containers
Container Name
Multiplicity
PortPin
1..*
X All Variants
---
Scope / Dependency
34 of 42
- AUTOSAR confidential -
PortPinMode :
EcucEnumerationParamDef
Port :EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
lowerMultiplicity = 1
upperMultiplicity = *
+literal
+literal
PORT_PIN_MODE_DIO :
EcucEnumerationLiteralDef
PORT_PIN_MODE_DIO_GPT :
EcucEnumerationLiteralDef
+container
+literal
PortConfigSet :EcucParamConfContainerDef
+literal
PORT_PIN_MODE_DIO_WDG :
EcucEnumerationLiteralDef
PORT_PIN_MODE_MEM :
EcucEnumerationLiteralDef
+subContainer
+literal
PortContainer :
EcucParamConfContainerDef
+literal
upperMultiplicity = *
lowerMultiplicity = 1
+literal
+subContainer
PortPin :
EcucParamConfContainerDef
+parameter
upperMultiplicity = *
lowerMultiplicity = 1
+literal
+literal
+literal
+literal
PORT_PIN_MODE_ADC :
EcucEnumerationLiteralDef
PORT_PIN_MODE_PWM :
EcucEnumerationLiteralDef
PORT_PIN_MODE_SPI :
EcucEnumerationLiteralDef
PORT_PIN_MODE_ICU :
EcucEnumerationLiteralDef
PORT_PIN_MODE_CAN :
EcucEnumerationLiteralDef
PORT_PIN_MODE_LIN :
EcucEnumerationLiteralDef
PORT_PIN_MODE_FLEXRAY :
EcucEnumerationLiteralDef
10.2.4 PortGeneral
SWS Item
Container Name
Description
Configuration Parameters
ECUC_Port_00117 :
PortGeneral
Module wide configuration parameters of the PORT driver.
SWS Item
Name
Description
ECUC_Port_00123 :
Multiplicity
PortDevErrorDetect
35 of 42
- AUTOSAR confidential -
ECUC_Port_00131 :
Multiplicity
Type
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucBooleanParamDef
--
Scope / Dependency
PortSetPinDirectionApi
false
Pre-compile time
Link time
Post-build time
scope: local
SWS Item
Name
Description
ECUC_Port_00132 :
Multiplicity
Type
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucBooleanParamDef
--
Scope / Dependency
X All Variants
---
X All Variants
---
PortSetPinModeApi
false
Pre-compile time
Link time
Post-build time
scope: local
SWS Item
Name
Description
ECUC_Port_00133 :
Multiplicity
Type
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucBooleanParamDef
--
X All Variants
---
PortVersionInfoApi
false
Pre-compile time
X All Variants
36 of 42
- AUTOSAR confidential -
Scope / Dependency
---
No Included Containers
The top level Port Driver container holds parameters that apply to the PORT
configuration.
PortGeneral :
EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 1
Port :EcucModuleDef
+parameter
PortSetPinDirectionApi :
EcucBooleanParamDef
+parameter
PortSetPinModeApi :
EcucBooleanParamDef
+container
upperMultiplicity = 1
lowerMultiplicity = 0
10.2.5 PortPin
SWS Item
Container Name
Description
Configuration Parameters
ECUC_Port_00118 :
PortPin
Configuration of the individual port pins.
SWS Item
Name
Description
ECUC_Port_00125 :
Multiplicity
Type
Range
1
EcucEnumerationParamDef
PORT_PIN_IN
PORT_PIN_OUT
PortPinDirection
The initial direction of the pin (IN or OUT). If the direction is not
changeable, the value configured here is fixed.
The direction must match the pin mode. E.g. a pin used for an ADC
must be configured to be an in port.
Implementation Type: Port_PinDirectionType
Port Pin direction set as input
Port Pin direction set as output
Post-Build Variant
true
Value
Value
Pre-compile time
Configuration
Link time
Class
Post-build time
Scope /
scope: local
37 of 42
X VARIANT-PRE-COMPILE
-X VARIANT-POST-BUILD
Document ID 040: AUTOSAR_SWS_PortDriver
- AUTOSAR confidential -
ECUC_Port_00126 :
Multiplicity
Type
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucBooleanParamDef
--
PortPinDirectionChangeable
Scope / Dependency
true
Pre-compile time
Link time
Post-build time
scope: local
X VARIANT-PRE-COMPILE
-X VARIANT-POST-BUILD
SWS Item
Name
Description
ECUC_Port_00127 :
Multiplicity
Type
Range
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucIntegerParamDef (Symbolic Name generated for this parameter)
1 .. 65535
--
PortPinId
Scope / Dependency
SWS Item
Name
Description
Multiplicity
Type
Range
false
Pre-compile time
Link time
Post-build time
scope: local
X All Variants
---
ECUC_Port_00128 :
PortPinInitialMode
Port pin mode from mode list for use with Port_Init() function.
1
EcucEnumerationParamDef
PORT_PIN_MODE_ADC
PORT_PIN_MODE_CAN
PORT_PIN_MODE_DIO
PORT_PIN_MODE_DIO_GPT
PORT_PIN_MODE_DIO_WDG
PORT_PIN_MODE_FLEXRAY
38 of 42
- AUTOSAR confidential -
PORT_PIN_MODE_PWM
PORT_PIN_MODE_SPI
Post-Build Variant
true
Value
Value
Pre-compile time
Configuration
Link time
Class
Post-build time
Scope /
scope: local
Dependency
SWS Item
Name
Description
Multiplicity
Type
Range
ECUC_Port_00129 :
PortPinLevelValue
Post-Build Variant
true
Value
Value
Pre-compile time
Configuration
Link time
Class
Post-build time
Scope /
scope: local
Dependency
SWS Item
Name
Description
ECUC_Port_00130 :
Multiplicity
Type
Range
1..*
EcucEnumerationParamDef
PORT_PIN_MODE_ADC
PORT_PIN_MODE_CAN
PORT_PIN_MODE_DIO
PortPinMode
PORT_PIN_MODE_DIO_GPT
PORT_PIN_MODE_DIO_WDG
PORT_PIN_MODE_FLEXRAY
39 of 42
- AUTOSAR confidential -
PORT_PIN_MODE_PWM
PORT_PIN_MODE_SPI
Post-Build Variant
true
Multiplicity
Post-Build Variant
true
Value
Multiplicity
Pre-compile time
Configuration
Link time
Class
Post-build time
Value
Pre-compile time
Configuration
Link time
Class
Post-build time
Scope /
scope: local
Dependency
SWS Item
Name
Description
ECUC_Port_00134 :
Multiplicity
Type
Default value
Post-Build Variant Value
Value Configuration Class
1
EcucBooleanParamDef
--
Scope / Dependency
X
-X
X
-X
VARIANT-PRE-COMPILE
VARIANT-POST-BUILD
VARIANT-PRE-COMPILE
VARIANT-POST-BUILD
PortPinModeChangeable
true
Pre-compile time
Link time
Post-build time
scope: local
X VARIANT-PRE-COMPILE
-X VARIANT-POST-BUILD
No Included Containers
40 of 42
- AUTOSAR confidential -
Port :EcucModuleDef
+container
PortConfigSet :EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 0
+subContainer
PortContainer :
EcucParamConfContainerDef
+parameter
upperMultiplicity = *
lowerMultiplicity = 1
PortNumberOfPortPins :
EcucIntegerParamDef
min = 1
max = 65535
+subContainer
PortPin :
EcucParamConfContainerDef
PortPinId :EcucIntegerParamDef
+parameter
min = 1
symbolicNameValue = true
max = 65535
upperMultiplicity = *
lowerMultiplicity = 1
+parameter
+parameter
PortPinDirectionChangeable :
EcucBooleanParamDef
PortPinLevelValue :
EcucEnumerationParamDef
+literal PORT_PIN_LEVEL_HIGH :
EcucEnumerationLiteralDef
+literal
+parameter
PortPinDirection :
EcucEnumerationParamDef
+literal
PORT_PIN_LEVEL_LOW :
EcucEnumerationLiteralDef
PORT_PIN_OUT :
EcucEnumerationLiteralDef
+literal
PORT_PIN_IN :
EcucEnumerationLiteralDef
+parameter
PortPinMode :
EcucEnumerationParamDef
lowerMultiplicity = 1
upperMultiplicity = *
+parameter
+parameter
PortPinInitialMode :
EcucEnumerationParamDef
PortPinModeChangeable :
EcucBooleanParamDef
10.2.6 PortConfigSet
SWS Item
Container Name
Description
ECUC_Port_00121 :
PortConfigSet
This container contains the configuration parameters and sub
containers of the AUTOSAR Port module.
Configuration Parameters
Included Containers
Container Name
PortContainer
Multiplicity
1..*
Scope / Dependency
41 of 42
- AUTOSAR confidential -
42 of 42
- AUTOSAR confidential -