AUTOSAR CP SRS SPALGeneral
AUTOSAR CP SRS SPALGeneral
AUTOSAR CP R23-11
1 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
AUTOSAR
2014-10-31 4.2.1 Release • Editorial changes
Management
• Link Requirement with BSW Feature
Document
AUTOSAR
2013-03-15 4.1.1 • Updating format of requirements
Administration
according to TPS
StandardizationTemplate
• Changes in SRS SPAL 12461: removed
AUTOSAR
2010-09-30 3.1.5 “All other registers shall be initialized by
Administration
the start-up code” from description
AUTOSAR
2010-02-02 3.1.4 • Legal disclaimer revised
Administration
AUTOSAR
2008-08-13 3.1.1 • Legal disclaimer revised
Administration
• Document meta information extended
AUTOSAR
2007-12-21 3.0.1
Administration • Small layout adaptations made
• Updated the use case in SRS SPAL
12092
• Changed 9 requirements
• Rejected 5 requirements
AUTOSAR
2005-05-31 1.0 • Initial release
Administration
2 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
Disclaimer
This work (specification and/or software implementation) 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 work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work 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 work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
3 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
Contents
1 Scope of Document 5
2 Requirements Guidelines 6
2.1 Conventions used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Requirements quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Requirements identification . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Requirements status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Acronyms and abbreviations 9
4 Conceptual Issues 10
4.1 General Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 List of drivers not affected by the clock frequency . . . . . . . . . . . . . 10
4.3 MCAL relevant ECU Power Modes . . . . . . . . . . . . . . . . . . . . . 10
4.4 Wake-up Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 Scheduling and integration of drivers . . . . . . . . . . . . . . . . . . . . 11
5 Requirements Specification 12
5.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.1 General Requirements . . . . . . . . . . . . . . . . . . . . . . 12
5.1.1.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.1.2 Initialization . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.1.3 Normal Operation . . . . . . . . . . . . . . . . . . . . . 16
5.1.1.4 Fault Operation . . . . . . . . . . . . . . . . . . . . . . 18
5.1.1.5 Shutdown Operation . . . . . . . . . . . . . . . . . . . 19
5.2 Non-Functional Requirements (Qualities) . . . . . . . . . . . . . . . . . . 20
5.2.1 Timing requirements . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2.2 Software design requirements . . . . . . . . . . . . . . . . . . 20
5.2.3 Process requirements . . . . . . . . . . . . . . . . . . . . . . . 21
6 Requirements Tracing 22
7 References 23
4 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
1 Scope of Document
This document specifies general requirements on Basic Software Modules of the fol-
lowing software layers:
• Microcontroller Abstraction Layer
• ECU Abstraction Layer
Those modules are of the following type:
• Drivers for µC-internal and external peripherals
• Handlers
• Interfaces
The selection of modules is derived from the WP Architecture BSW Module List and
Layered Architecture. The following modules are in scope:
• Memory drivers and interfaces (internal/external EEPROM, Flash, Flash EEP-
ROM Emulation)
• I/O drivers (PORT, ADC, DIO, PWM, ICU, OCU)
• I/O Hardware Abstraction
• ECU onboard communication drivers and handlers (SPI)
• System drivers (internal/external Watchdog, MCU, GPT, RAM test)
Constraints
First scope for specification of requirements on basic software modules are systems
which are not safety relevant. For this reason safety requirements are assigned to
medium priority.
5 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
2 Requirements Guidelines
Existing specifications shall be referenced (in form of a single requirement). Differ-
ences to these specifications are specified as additional requirements.
6 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
7 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
• Initialization
• Normal Operation
• Shutdown Operation
• Fault Operation
• ...
Non-Functional Requirements:
• Timing Requirements
• Resource Usage
• Usability
• Output for other WPs (e.g. Description Templates, Tooling,...)
• ...
8 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
Table 3.1: Acronyms and abbreviations used in the scope of this Document
As this is a document from professionals for professionals, all other terms are expected
to be known.
9 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4 Conceptual Issues
10 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
11 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
5 Requirements Specification
This chapter contains general requirements which apply to all modules of the Micro-
controller and ECU Abstraction Layers, but not necessarily to Basic Software Modules
of other layers.
5.1.1.1 Configuration
[SRS_SPAL_12263] The implementation of all driver modules shall allow the con-
figuration of specific module parameter types at link time d
The implementation of all driver modules shall allow the configuration of the
following module parameter types at link time:
• values written to hardware registers
c()
[SRS_SPAL_12056] All driver modules shall allow the static configuration of no-
tification mechanism d
12 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Supporting –
Material:
c(RS_BRF_01064)
[SRS_SPAL_12267] Wakeup sources shall be initialized by MCAL drivers and/or
the MCU driver d
Wakeup sources shall be initialized by MCAL drivers and/or the MCU driver.
Description:
Possible wake-up sources are e.g. reset, watchdog, NMI, interrupt etc.
Rationale: Allow the configuration of MCU to wake-up.
The GPT interrupt is enabled by the GPT driver and should wake-up the MCU
Use Case:
from Idle/Sleep/Stop mode.
Dependencies: –
Supporting –
Material:
c(RS_BRF_01104, RS_BRF_01496)
5.1.1.2 Initialization
c(RS_BRF_01096)
[SRS_SPAL_12125] All driver modules shall only initialize the configured re-
sources d
All driver modules shall only initialize the configured resources. Resources that
Description:
are not configured in the configuration file shall not be touched.
Rationale: Allow integration with complex drivers without resource conflicts.
Timer channels 0..3 are used by the GPT driver, timer channels 4..6 are used
Use Case:
by complex drivers
Dependencies: [SRS_SPAL_12057] Driver module initialization
5
13 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Supporting –
Material:
c(RS_BRF_01096)
[SRS_SPAL_12163] All driver modules shall implement an interface for de-
initialization d
c(RS_BRF_01096)
[SRS_SPAL_12461] Specific rules regarding initialization of controller registers
shall apply to all driver implementations d
14 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Supporting I/O register: Everything that can affect the functionality of a port pin.
Material:
c(RS_BRF_01096)
[SRS_SPAL_12462] The register initialization settings shall be published d
The implementers of the respective driver modules have to publish all register
Description:
initialization settings in the driver modules documentation.
The configurator (human or tool responsible for configuring the software) needs
Rationale: to get the register settings of the register that are not initialized directly by the
driver
Use Case: –
Dependencies: SRS_SPAL_12461
Supporting –
Material:
c()
[SRS_SPAL_12463] The register initialization settings shall be combined and
forwarded d
The configurator shall combine all initialization settings from different drivers
and check them for consistency (dependency and conflict).
If this check is successful it shall forward those combined settings to the
Description:
module that is responsible for initializing the hardware.
If there are any inconsistencies, the configurator has to raise an error and the
system build process has to be restarted.
Make sure all controller registers are used in a consistent way and all driver
Rationale: requirements on register initialization settings are fulfilled.
Use Case: –
Dependencies: [SRS_SPAL_12461], [SRS_SPAL_12462]
Supporting –
Material:
c(RS_BRF_01096)
[SRS_SPAL_12068] The modules of the MCAL shall be initialized in a defined
sequence d
15 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Rationale: Defined initialization sequence without side effects.
Use Case: Power On Reset
Dependencies: –
Supporting –
Material:
c(RS_BRF_01096)
[SRS_SPAL_12069] All drivers of the SPAL that wake up from a wake-up interrupt
shall report the wake-up reason d
All drivers of the SPAL that wake up from a wake-up interrupt shall report the
wake-up reason to the ECU State Manager via the IO hardware abstraction.
Notifications come from SPAL-drivers and shall be handled within the IO
Description: hardware abstraction module before the wake up reason is sent to the ECU
state manager.
Implementation hint:
Usually this notification is done from the ISR of the wake-up.
The ECU State Manager needs the wake-up reason. It allows guaranteeing low
Rationale: consumption. For the ICU for instance, it avoids the report of non valid wake-up
reasons (spikes).
The ISR of the associated wake-up interrupt calls the wake-up report function
Use Case: of the ECU State Manager if wake-up occurs.
Dependencies: –
Supporting –
Material:
c(RS_BRF_01104)
All drivers and handlers of the AUTOSAR Basic Software shall implement the
following notification mechanisms (configurable per module) for use within the
Basic Software:
• Polling (by reading a status information)
Description:
• Callback functions
• Error reporting function of the Default Error Tracer
• Event reporting function of the Diagnostic Event Manager
5
16 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Flexible integration
Rationale:
Avoidance of strong coupling and dependencies
The completion of an EEPROM write command can be signaled via a callback
function or by setting status information (which is accessible via the module
Use Case: interface).
A fault occurred during EEPROM writing (cell defective) can be signaled to the
Diagnostic Event Manager.
Dependencies: Review annotation #35 of Mr. Schumpelt/Bosch
Supporting –
Material:
All driver modules that provide different operation modes shall provide a
service for mode selection.
Description:
This service allows switching from one operation mode to another operation
mode without the need of de-initialization and new initialization.
Allow operation mode changes where a full de-initialization and a new
Rationale:
initialization would cause not desired artifacts.
Use Case: Switch EEPROM driver from normal mode to burst mode
Dependencies: [SRS_SPAL_12064] Change of operation mode during running operation
Supporting –
Material:
c()
[SRS_SPAL_12063] All driver modules shall only support raw value mode d
All driver modules shall only support raw value mode. In this mode values
Description:
passed via the API services are used directly without further scaling.
Scaling and adaptation to physical values is task of the ECU Abstraction Layer.
Rationale:
Raw value mode provides the highest performance.
The I/O Hardware Abstraction converts a raw ADC value to a scaled value (e.g.
Use Case: voltage) and the other way round.
Dependencies: –
Supporting –
Material:
c()
17 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
[SRS_SPAL_12075] All drivers with random streaming capabilities shall use ap-
plication buffers d
All drivers with random streaming capabilities (memory drivers) shall use
Description: application buffers. The caller shall not change the data during job processing
of the driver.
Rationale: Minimal RAM consumption, runtime efficiency
The EEPROM write service gets a pointer to the source data to be written.
Use Case: During EEPROM write operation the driver reads data from the application
buffer. The EEPROM driver does not provide an own data buffer.
Dependencies: –
Supporting –
Material:
c()
[SRS_SPAL_12129] The ISRs shall be responsible for resetting the interrupt flags
and calling the according notification function d
The ISRs shall be responsible for resetting the interrupt flags and calling the
Description:
according notification function.
The notification functions can be user defined and therefore not allowed to have
Rationale:
direct access to hardware.
Use Case: –
Dependencies: –
Supporting –
Material:
c()
[SRS_SPAL_12064] All driver modules shall raise an error if the change of the
operation mode leads to degradation of running operations d
All driver modules shall raise an error if the change of the operation mode leads
to degradation of running operations.
18 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
Supporting –
Material:
c(RS_BRF_02168, RS_BRF_01440)
[SRS_SPAL_12448] All driver modules shall have a specific behavior after a de-
velopment error detection d
c(RS_BRF_02232)
[SRS_SPAL_12067] All driver modules shall set their wake-up conditions de-
pending on the selected operation mode d
All driver modules shall set their wake-up conditions depending on the selected
Description:
operation mode.
Rationale: Allow enabling of module specific wake-up interrupts.
Example:
The ECU state manager switches the ECU power mode to ’ECU_
Use Case: POWERMODE_SLEEP’.
The modules ’GPT’ and ’ICU’ enable specific wake-up interrupts according to
their configuration related to ’ECU_POWERMODE_SLEEP’.
Dependencies: [SRS_SPAL_12169] Control of operation mode
Supporting –
Material:
c(RS_BRF_01104)
19 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
c()
[SRS_SPAL_12078] The drivers shall be coded in a way that is most efficient in
terms of memory and runtime resources d
Description: The drivers shall be coded in a way that is most efficient in terms of memory
and runtime resources.
Rationale: Avoid waste of resources.
Use Case: Usage of the driver in embedded automotive systems.
Dependencies: –
Supporting –
Material:
c()
20 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
4
The EEPROM driver is controlled exclusively by the NVRAM
Manager via the EEPROM Abstraction module and the Memory Abstraction
Use Case:
Interface.
No other form of access to the EEPROM driver’s API shall be allowed.
Dependencies: –
Supporting –
Material:
c()
[SRS_SPAL_12265] Configuration data shall be kept constant d
The contents of the init structure passed to the module via the init function shall
be kept constant and available during runtime.
Description:
Comment:
Usually, this init data structure is located in ROM.
Rationale: The module could access this structure at any time.
Use Case: –
Dependencies: –
Supporting –
Material:
c(RS_BRF_01152)
The SWS (software specification) shall specify for each configuration element
• whether it is configurable before or after compile time
Description:
• where this configuration item is located (init data structure, configuration
header file *_Cfg.h)
Enable correct implementation of configuration parameters that allow for object
Rationale:
code delivery
Use Case: –
Dependencies: [SRS_SPAL_12263] Configuration after compile time
Supporting –
Material:
c()
21 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
6 Requirements Tracing
The following table references the features specified in [3] and links to the fulfillments
of these.
Requirement Description Satisfied by
[RS_BRF_01064] AUTOSAR BSW shall provide [SRS_SPAL_00157] [SRS_SPAL_12056]
callback functions in order to access
upper layer modules
[RS_BRF_01096] AUTOSAR shall support start-up and [SRS_SPAL_12057] [SRS_SPAL_12068]
shutdown of ECUs [SRS_SPAL_12125] [SRS_SPAL_12163]
[SRS_SPAL_12461] [SRS_SPAL_12463]
[RS_BRF_01104] AUTOSAR shall support sleep and [SRS_SPAL_12067] [SRS_SPAL_12069]
wake-up of ECUs and buses [SRS_SPAL_12267]
[RS_BRF_01152] AUTOSAR shall support limited [SRS_SPAL_12265]
dynamic reconfiguration
[RS_BRF_01440] AUTOSAR services shall support [SRS_SPAL_12064]
system diagnostic functionality
[RS_BRF_01496] AUTOSAR shall standardize how [SRS_SPAL_12267]
events which move an ECU out of the
SLEEP mode are handled
[RS_BRF_02168] AUTOSAR diagnostics shall provide a [SRS_SPAL_00157] [SRS_SPAL_12064]
central classification and handling of
abnormal operative conditions
[RS_BRF_02232] AUTOSAR shall support development [SRS_SPAL_00157] [SRS_SPAL_12448]
with run-time assertion checks
Table 6.1: RequirementsTracing
22 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral
General Requirements on SPAL
AUTOSAR CP R23-11
7 References
23 of 23 Document ID 9: AUTOSAR_CP_SRS_SPALGeneral