DEENESPTFRRUARHIKOZHNL

I/O Hardware Abstraction (IoHwAb)

ModulIoHwAb (I/O Hardware Abstraction)
BSW-Modul-ID254
Standard-Header#include "IoHwAb.h"
SWS-SpezifikationAUTOSAR_CP_SWS_IOHardwareAbstraction.pdf, AUTOSAR_SWS_IOHardwareAbstraction.pdf, AUTOSAR_SWS_IO_HWAbstraction.pdf
Umfang59 Records · 22 Snippets
ClusterMikrocontroller-Abstraktion (MCAL & I/O)

I/O Hardware Abstraction (IoHwAb)

AUTOSAR Classic I/O HW Abstraction-Modul I/O Hardware Abstraction (IoHwAb, Spezifikation: AUTOSAR_CP_SWS_IOHardwareAbstraction.pdf, AUTOSAR_SWS_IOHardwareAbstraction.pdf, AUTOSAR_SWS_IO_HWAbstraction.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

función IoHwAb_Init<Init_Id> [SWS_IoHwAb_00119] 📄 PDF

void IoHwAb_Init<Init_Id>(const IoHwAb{Init_Id}_ConfigType* ConfigPtr);

Initializes either all the IO Hardware Abstraction software or is a part of the IO Hardware Abstraction.

función IoHwAb_AdcID> [SWS_IoHwAb_00121] 📄 PDF

void IoHwAb_AdcNotification<#group ID>(void);

Will be called by the ADC Driver when a group conversion is completed for group <#group ID>.

función IoHwAb_Pwm [SWS_IoHwAb_00122] 📄 PDF

void IoHwAb_PwmNotification<#channel>(void);

Will be called by the PWM Driver when a signal edge occurs on channel <#channel>.

función IoHwAb_Icu [SWS_IoHwAb_00123] 📄 PDF

void IoHwAb_IcuNotification<#channel>(void);

Will be called by the ICU driver when a signal edge occurs on channel <#channel>.

función IoHwAb_Gpt [SWS_IoHwAb_00124] 📄 PDF

void IoHwAb_GptNotification<#channel>(void);

Will be called by the GPT driver when a timer value expires on channel <#channel>.

función IoHwAb_Dcm_<Ecu Signal Name> [SWS_IoHwAb_00135] 📄 PDF

void IoHwAb_Dcm_<Ecu Signal Name>(uint8 action, <Ecu Signal DataType> signal);

This function provides control access to a certain ECU Signal t o the DCM module (<Ecu Signalname> is the symbolic name of an ECU Signal). The ECU signal can be locked and unlocked by this function. Locking 'freezes' the ECU signal to the current value, the configured default value or a value given by the parameter 'si gnal'.

función IoHwAb_Dcm_Read<Ecu Signal Name> [SWS_IoHwAb_00139] 📄 PDF

void IoHwAb_Dcm_Read<Ecu Signal Name>(<Ecu Signal DataType>* signal);

This function provides read access to a certain ECU Signal to the DCM module (<Ecu Signalname> is the symbolic name of an ECU Signal).

función IoHwAb_PreparePower [SWS_IoHwAb_00146] 📄 PDF

void IoHwAb_PreparePowerState<#Mode>(void);

The API shall be invoked by the Io Hw Abs in order to prepare the transition to a given power state. The aim of this API is to incapsulate all actions to prepare the HW for a predefined power mode, decoupling application power definition from HW power stat es.

función IoHwAb_EnterPower [SWS_IoHwAb_00147] 📄 PDF

void IoHwAb_EnterPowerState<#Mode>(void);

The API shall be invoked by the Io Hw Abs in order to effectively enter a power state which was prepared by the API Io Hw Ab_ Prepare Power State<#Mode> () . The aim of this API is to incapsulate all actions to set the HW in a power state corresponding to a predefined power mode, decoupling application power definition from HW power states.

función IoHwAb_Adc_NotifyReadyForPower [SWS_IoHwAb_00154] 📄 PDF

void IoHwAb_Adc_NotifyReadyForPowerState<#Mode>(void);

The API shall be invoked by the ADC Driver when the requested power state preparation for mode <#Mode> is completed.

función IoHwAb_Ocu [SWS_IoHwAb_00155] 📄 PDF

void IoHwAb_OcuNotification<#channel>(void);

Will be called by the OCU driver when the current value of the threshold matches the threshold on the channel<#channel>.

función IoHwAb_Pwm_NotifyReadyForPower [SWS_IoHwAb_91002] 📄 PDF

void IoHwAb_Pwm_NotifyReadyForPowerState<#Mode>(void);

The API shall be invoked by the PWM Driver when the requested power state preparation for mode <#Mode> is completed.

requirement SWS_IoHwAb_00001 [SWS_IoHwAb_00001] 📄 PDF

The I/O Hardware Abstraction shall be based upon the Software Component Template as specified in document [ [8] ].

requirement SWS_IoHwAb_00019 [SWS_IoHwAb_00019] 📄 PDF

All ECU Signals shall have a Filtering/Debounce Attribute, so that the captured ‘raw’ - values can be filtered or debounced before passing them to the upper layer. This attribute is only reasonable for input signals. It influences the implementation of acq uisition and access to the signal values.

requirement SWS_IoHwAb_00021 [SWS_IoHwAb_00021] 📄 PDF

All ECU signals shall have an Age Attribut e. The Age Attribute has two specific names according to the direction of ECU signal (Input / Output). Anyway, it always contains a maximum time value. Following descriptions explain the meaning of this Attribute for each kind of ECU signals.  ECU Input si gnals: the specific functionality of this attribute is to limit the signals lifetime. The value defines the maximum allowed age for data of this signal. If the lifetime is 0, the signal has to be retrieved from the physical register, immediately. If the li fetime is greater than 0, the signal is valid for the specified time.  ECU Output signals: the specific functionality of this attribute is to limit the signal output to a maximum delay. The value defines the maximum allowed time until this signal is actuall y set. If delay is 0, then the signal has to be set to the physical register, immediately. If the delay is greater than 0, the signal can be set until the configured time has elapsed.

requirement SWS_IoHwAb_00025 [SWS_IoHwAb_00025] 📄 PDF

The I/O Hardware Abstraction shall be implemented as one or more instances of the EcuAbstractionSwCo mponentType .

requirement SWS_IoHwAb_00033 [SWS_IoHwAb_00033] 📄 PDF

The implementation has to take into consideration, that the callback functions will be executed in interrupt context.

requirement SWS_IoHwAb_00034 [SWS_IoHwAb_00034] 📄 PDF

The number of available cal lback functions and the order of execution will be implementation dependent and must be documented in the I /O Hardware Abstraction BSWMD.

requirement SWS_IoHwAb_00035 [SWS_IoHwAb_00035] 📄 PDF

The I/O Hardware Abstraction may contain one or several job processing functions that are BswSchedulableEnt ities (a sub - class of BswModuleEntity by opposition to BswInterruptEntity, e.g. one for each device driver) . They shall be activated according to their use. They will be time - triggered by the BSW Scheduler. They could be synchronized to the execution of th e other runnable entities. The number of BswSchedulableEntities and their order of execution will be imple mentation dependent and must be documented in the I/O Hardware Abstraction description.

requirement SWS_IoHwAb_00036 [SWS_IoHwAb_00036] 📄 PDF

The I/O Hardware Abstraction shall define BswModuleEntries to exchange data with other software below the RTE outside interrupt context, for example in case of BSW init ialization/de - initialization.

requirement SWS_IoHwAb_00037 [SWS_IoHwAb_00037] 📄 PDF

The initialization/de - initialization functions shall be used/handled by the ECU State Manager, exclusively. For more information, refer to [10] . The number of available functions and the order of execution are implementation - d ependent and must be documented in the I/O Hardware Abstraction description.

requirement SWS_IoHwAb_00038 [SWS_IoHwAb_00038] 📄 PDF

Integration code usually means that this software is designed to suite a specific ECU hardware layout. All strategies to protect the hardware shall be included in this software. This document does not intend to standardize or give a recommendation for suc h hardware protection.

requirement SWS_IoHwAb_00039 [SWS_IoHwAb_00039] 📄 PDF

The I/O Hardware Abstraction shall not contain strategies for failure recovery. Failure recovery actions can only be decided by the responsible SWC.

requirement SWS_IoHwAb_00059 [SWS_IoHwAb_00059] 📄 PDF

This kind of function initializes eit her all the I/O Hardware Abstraction software, or a part of the I/O Hardware Abstraction.

requirement SWS_IoHwAb_00060 [SWS_IoHwAb_00060] 📄 PDF

The multiplicity of I/O devices managed by the I/O Hardware Abstraction software shall be handled via several init functions. Each init function shall be tagged with an <Init_ID>. Therefore, an external device, having its driver encapsulated inside the I/O Hardware Abstraction, can be separately initialized.

requirement SWS_IoHwAb_00061 [SWS_IoHwAb_00061] 📄 PDF

This kind of init function shall called by the ECU State Manager. The ECU integrator is able to configure the init sequence order called by the ECU State manager.

requirement SWS_IoHwAb_00063 [SWS_IoHwAb_00063] 📄 PDF

An ECU signal represents one electrical signal, which means at least one input or output ECU pin.

requirement SWS_IoHwAb_00068 [SWS_IoHwAb_00068] 📄 PDF

The implementation behind the service of the I/O Hardware Abstraction's Provide Ports is ECU specific and the mapping to the corresponding “PortInterface” shall be documented in the Software Component description.

requirement SWS_IoHwAb_00069 [SWS_IoHwAb_00069] 📄 PDF

For an ECU Signal associated with a PortInterface configured as an input signal, the I/O Hardware Abstraction shall provide a GET operation, and the operation short name can be freely choose.

requirement SWS_IoHwAb_00075 [SWS_IoHwAb_00075] 📄 PDF

The I/O Hardware Abstraction specification defines only recommendations for the Port usage. The in stantiation of the Ports shall be done during the configuration process and is specific to the ECU electronic design.

requirement SWS_IoHwAb_00078 [SWS_IoHwAb_00078] 📄 PDF

The I/O Hardware Abstraction implementation shall provide Software Components with access to all MCAL drivers.

requirement SWS_IoHwAb_00079 [SWS_IoHwAb_00079] 📄 PDF

The I/O Hardware Abstraction implementation shall provide Software Components with access to communication drivers (for instance by SPI), if on - board devices are managed.

requirement SWS_IoHwAb_00102 [SWS_IoHwAb_00102] 📄 PDF

After having finished the module initialization, the I/O Hardware Abstraction state sha ll be set to IOHWAB_IDLE , the job result shall be set to IOHWAB_JOB_OK .

requirement SWS_IoHwAb_00104 [SWS_IoHwAb_00104] 📄 PDF

The functio n IoHwAb_AdcNotification<#group ID> is intended to be called by the ADC driver when a group conversion is completed for group <#group ID>.

requirement SWS_IoHwAb_00105 [SWS_IoHwAb_00105] 📄 PDF

The function IoHwAb_PwmNotifica tion<#channel> is intended to be called by the PWM driver when a signal edge occurs on channel <#channel>.

requirement SWS_IoHwAb_00106 [SWS_IoHwAb_00106] 📄 PDF

The function IoHwAb_IcuNotification<#channel> is intended to be called by the ICU driver when a signal edge occurs on channel <#channel>.

requirement SWS_IoHwAb_00107 [SWS_IoHwAb_00107] 📄 PDF

The function IoHwAb_GptNotification<#channel> is intended to be called by the GPT driver when a timer value expires on channel <#channel>.

requirement SWS_IoHwAb_00136 [SWS_IoHwAb_00136] 📄 PDF

This function allows controlling the associated ECU Signal, i.e. the ECU Signal can be locked, unlocked, and adjusted to a certain value.

requirement SWS_IoHwAb_00140 [SWS_IoHwAb_00140] 📄 PDF

This function provides read access to a certain ECU Signal to the DCM module. The read access is independent from the ECU Signa l's current state (locked/unlocked) and shall always r ead the current physical value from the hardware.

requirement SWS_IoHwAb_00143 [SWS_IoHwAb_00143] 📄 PDF

The function prototype for the callback function functions of the I/O Hardware Abstraction which are routed via RTE shall be implemented according to the following rule: StdReturnType R te_Call_<p>_<o>(<parameters>)

requirement SWS_IoHwAb_00149 [SWS_IoHwAb_00149] 📄 PDF

This API is a configurable callout and shall be defined per configuration once per Power Mode to be managed.

requirement SWS_IoHwAb_00150 [SWS_IoHwAb_00150] 📄 PDF

This callout shall be executed in the context of the IoHwAbs SWC, meani ng that it has full access to the MCAL.

requirement SWS_IoHwAb_00151 [SWS_IoHwAb_00151] 📄 PDF

This API is a configurable callout and sha ll be defined per configuration once per Pow er Mode to be managed.

requirement SWS_IoHwAb_00152 [SWS_IoHwAb_00152] 📄 PDF

This callout shall be executed in the context of the IoHwAbs SWC, meaning that it has full access to the MCAL.

requirement SWS_IoHwAb_00153 [SWS_IoHwAb_00153] 📄 PDF

This API executes all power st ate transition prepared by the preceding cal l to the correposonding IoHwAb_PreparePowerState<#Mode>.

requirement SWS_IoHwAb_00156 [SWS_IoHwAb_00156] 📄 PDF

The function IoHwAb_OcuNotification<#channel> is intended to be called by the OCU driver when the current value of the counter matches the thre shold on channel <#channel>.

requirement SWS_IoHwAb_91001 [SWS_IoHwAb_91001] 📄 PDF

Type of error Related error code Error value Up to the implementer to define error he wants to report Up to the implementer 0x01

requirement SWS_IoHwAb_91003 [SWS_IoHwAb_91003] 📄 PDF

Adc _ Get Group - Status Adc.h Returns the conversion status of the requested ADC Channel group. Adc _ Get - Stream Last - Pointer Adc.h Returns the number of valid samples per channel, stored in the result buffer. Reads a pointer, pointing to a position in the group result buffer. With the pointer position, the results of all group channels of the last completed conversion round can be accessed. With the pointer and the return value, all valid group conversion results can be accessed (the user has to take the layout of the result buffer into account). Adc _ Read - Group Adc.h Reads the group conversion r esult of the last completed conversion round of the requested group and stores the channel values starting at the Data Buffer Ptr address. The group channel values are stored in ascending channel number order ( in contrast to the storage layout of the resu lt buffer if streaming access is configured). Adc _ Setup - Result Buffer Adc.h Initializes ADC driver with the group specific result buffer start address where the conversion results will be stored. The application has to ensure that the application buffer , where Data Buffer Ptr points to, can hold all the conversion results of the specified group. The initialization with Adc_ Setup Result Buffer is required after reset, before a group conversion can be started. Adc _ Start - Group - Conversion Adc.h Starts th e conversion of all channels of the requested ADC Channel group. Adc _ Stop - Group - Conversion Adc.h Stops the conversion of the requested ADC Channel group. Dio _ Read - Channel Dio.h Returns the value of the specified DIO channel. Dio _ Read - Channel Group Dio.h This Service reads a subset of the adjoining bits of a port. Dio _ Read Port Dio.h Returns the level of all channels of that port. Dio _ Write - Channel Dio.h Service to set a level of a channel. Dio _ Write - Channel Group Dio.h Service to set a sub set of the adjoining bits of a port to a specified level. Dio _ Write Port Dio.h Service to set a value of the port. Gpt _ Check - Wakeup Gpt.h Checks if a wakeup capable GPT channel is the source for a wakeup event and calls the ECU state manager service Ecu M_ Set Wakeup Event in case of a valid GPT channel wakeup event. Gpt _ Disable - Wakeup Gpt.h Disables the wakeup interrupt of a channel (rel evant in sleep mode). Gpt _ Enable - Wakeup Gpt.h Enables the wakeup interrupt of a channel (relevant in sleep mode). Gpt _ Get Time - Elapsed Gpt.h Returns the time already elapsed. Gpt _ Get Time - Remaining Gpt.h Returns the time remaining until the target time is reached. Gpt _ Set Mode Gpt.h Sets the operation mode of the GPT. Icu _ Disable - Edge Count Icu.h This function disables the counting of edges of the given channel. Icu _ Disable - Notification Icu.h This function disables the notification of a channel. Icu _ Disable - Wakeup Icu.h This function disables the wakeup capability of a single ICU channel. Icu _ Enable - Edge Count Icu.h This function enables the counting of edges of the given channel. Icu _ Enable - Notification Icu.h This function enables the notification on the given channel. Icu _ Enable - Wakeup Icu.h This function (re - )enables the wakeup capability of the given ICU channel. Icu _ Get Duty - Icu.h This function reads the coherent active time and period time for the Cycle Values given ICU Channel. Icu _ Get Edge - Numbers Icu.h This function reads the number of counted edges. Icu _ Get Input - State Icu.h This function returns the status of the ICU input. Icu _ Ge t Time - Elapsed Icu.h This function reads the elapsed Signal Low Time for the given channel. Icu _ Get - Timestamp - Index Icu.h This function reads the timestamp index of the given channel. Icu _ Reset Edge - Count Icu.h This function resets the value of the c ounted edges to zero. Icu _ Set - Activation - Condition Icu.h This function sets the activation - edge for the given channel. Icu _ Start Signal - Measurement Icu.h This function starts the measurement of signals. Icu _ Start - Timestamp Icu.h This function starts the capturing of timer values on the edges. Icu _ Stop Signal - Measurement Icu.h This function stops the measurement of signals of the given channel. Icu _ Stop - Timestamp Icu.h This function stops the timestamp measurement of the give n channel. Ocu _ Disable - Notification Ocu.h This service is used to disable notifications from an OCU channel. Ocu _ Enable - Notification Ocu.h This service is used to enable notifications from an OCU channel. Ocu _ Get - Counter Ocu.h Service to read the current value of the counter. Ocu _ Set - Absolute - Threshold Ocu.h Service to set the value of the channel threshold using an absolute input data. Ocu _ Set Pin - State Ocu.h Service to set immediately the level of the pin associated to a n OCU channel. Ocu _ Set - Relative - Threshold Ocu.h Service to set the value of the channel threshold relative to the current value of the counter. Ocu _ Start - Channel Ocu.h Service to start an OCU channel. Ocu _ Stop - Channel Ocu.h Service to stop an OCU channel. Port _ Refresh - Port.h Refreshes port direction. Port Direction Port _ Set Pin - Direction Port.h Sets the port pin direction Port _ Set Pin - Mode Port.h Sets the port pin mode. Pwm _ Get - Output State Pwm.h Service to read the internal state of the PWM output signal. Spi _ Async - Transmit Spi.h Service to transmit data on the SPI bus. Spi _ Cancel Spi.h Service cancels the specified on - going sequence transmission. Spi _ Get H W - Unit Status Spi.h This servic e returns the status of the specified SPI Hardware microcontroller peripheral. Spi _ Get Job - Result Spi.h This service returns the last transmission result of the specified Job. Spi _ Get - Sequence - Result Spi.h This service returns the last transmission result of the specified Sequence. Spi _ Get Status Spi.h Service returns the SPI Handler/ Driver software module status. Spi _ Main - Function _ - Handling Sch M_ Spi.h -- Spi _ Read I B Spi.h Service for reading s ynchronously one or more data from an IB SPI Handler/ Driver Channel specified by parameter. Spi _ Set Async - Mode Spi.h Service to set the asynchronous mechanism mode for SPI busses handled asynchronously. Spi _ Setup E B Spi.h Service to setup the buffe rs and the length of data for the EB SPI Handler/ Driver Channel specified. Spi _ Sync - Transmit Spi.h Service to transmit data on the SPI bus Spi _ Write I B Spi.h Service for writing one or more data to an IB SPI Handler/ Driver Channel specified by parameter.

requirement SWS_IoHwAb_91004 [SWS_IoHwAb_91004] 📄 PDF

Det _ Report Error Det.h Service to report development errors. Ecu M _ Set Wakeup Event Ecu M.h Sets the wakeup event.

requirement SWS_IoHwAb_91005 [SWS_IoHwAb_91005] 📄 PDF

Module Header File Imported Type Adc Adc.h Adc _ Group Type Adc.h Adc _ Status Type Adc.h Adc _ Stream Num Sample Type Adc.h Adc _ Value Group Type Dio Dio.h Dio _ Channel Group Type Dio.h Dio _ Channel Type Dio.h Dio _ Level Type Dio.h Dio _ Port Level Type Dio.h Dio _ Port Type Ecu M Ecu M.h Ecu M _ Wakeup Source Type Gpt Gpt.h Gpt _ Channel Type Gpt.h Gpt _ Mode Type Gpt.h Gpt _ Value Type Icu Icu.h Icu _ Activation Type Icu.h Icu _ Channel Type Icu.h Icu _ Duty Cycle Type Icu.h Icu _ Edge Number Type Icu.h Icu _ Index Type Icu.h Icu _ Input State Type Icu.h Icu _ Value Type Ocu Ocu.h Ocu _ Channel Type Ocu.h Ocu _ Pin State Type Ocu.h Ocu _ Return Type Ocu.h Ocu _ Value Type Port Port.h Port _ Pin Direction Type Port.h Port _ Pin Mode Type Port.h Port _ Pin Type Pwm Pwm.h Pwm _ Channel Type Pwm.h Pwm _ Output State Type Spi Spi.h Spi _ Async Mode Type Spi.h Spi _ Channel Type Spi.h Spi _ Data Buffer Type Spi.h Spi _ H W Unit Type Spi.h Spi _ Job Result Type Spi.h Spi _ Job Type Spi.h Spi _ Number Of Data Type Spi.h Spi _ Seq Result Type Spi.h Spi _ Sequence Type Spi.h Spi _ Status Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_IoHwAb
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_IoHwAb@rel:R20-11#14c2d8a2
Content hash
14c2d8a2
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_IOHardwareAbstraction.pdf#nameddest=SWS_IoHwAb_00119

Inicialización y estado

Returns the version information of this module.

void IoHwAb_GetVersionInfo(Std_VersionInfoType* versioninfo);

Servicios

The API shall be invoked by the ADC Driver when the requested power state preparation for mode <#Mode> is completed.

void IoHwAb_Adc_NotifyReadyForPowerState<#Mode>(void);

The API shall be invoked by the Io Hw Abs in order to effectively enter a power state which was prepared by the API Io Hw Ab_ Prepare Power State<#Mode> () . The aim of this API is to incapsulate all actions to set the HW in a power state corresponding to a predefined power mode, decoupling application power definition from HW power states.

void IoHwAb_EnterPowerState<#Mode>(void);

Will be called by the GPT driver when a timer value expires on channel <#channel>.

void IoHwAb_GptNotification<#channel>(void);

Will be called by the ICU driver when a signal edge occurs on channel <#channel>.

void IoHwAb_IcuNotification<#channel>(void);

Initializes either all the IO Hardware Abstraction software or is a part of the IO Hardware Abstraction.

void IoHwAb_Init<Init_Id>(const IoHwAb{Init_Id}_ConfigType* ConfigPtr);

Will be called by the OCU driver when the current value of the threshold matches the threshold on the channel<#channel>.

void IoHwAb_OcuNotification<#channel>(void);

The API shall be invoked by the Io Hw Abs in order to prepare the transition to a given power state. The aim of this API is to incapsulate all actions to prepare the HW for a predefined power mode, decoupling application power definition from HW power stat es.

void IoHwAb_PreparePowerState<#Mode>(void);

The API shall be invoked by the PWM Driver when the requested power state preparation for mode <#Mode> is completed.

void IoHwAb_Pwm_NotifyReadyForPowerState<#Mode>(void);

Will be called by the PWM Driver when a signal edge occurs on channel <#channel>.

void IoHwAb_PwmNotification<#channel>(void);

Callouts e interfaces esperadas

<#group ID> función

Will be called by the ADC Driver when a group conversion is completed for group <#group ID>.

void IoHwAb_AdcNotification<#group ID>(void);

This function provides control access to a certain ECU Signal t o the DCM module (<Ecu Signalname> is the symbolic name of an ECU Signal). The ECU signal can be locked and unlocked by this function. Locking 'freezes' the ECU signal to the current value, the configured default value or a value given by the parameter 'si gnal'.

void IoHwAb_Dcm_<Ecu Signal Name>(uint8 action, <Ecu Signal DataType> signal);

This function provides read access to a certain ECU Signal to the DCM module (<Ecu Signalname> is the symbolic name of an ECU Signal).

void IoHwAb_Dcm_Read<Ecu Signal Name>(<Ecu Signal DataType>* signal);

Tipos

Configuration data structure of the Io Hw Ab module.

Requisitos

SWS_IoHwAb_00001 requirement

The I/O Hardware Abstraction shall be based upon the Software Component Template as specified in document [ [8] ].

SWS_IoHwAb_00019 requirement

All ECU Signals shall have a Filtering/Debounce Attribute, so that the captured ‘raw’ - values can be filtered or debounced before passing them to the upper layer. This attribute is only reasonable for input signals. It influences the implementation of acq uisition and access to the signal values.

SWS_IoHwAb_00021 requirement

All ECU signals shall have an Age Attribut e. The Age Attribute has two specific names according to the direction of ECU signal (Input / Output). Anyway, it always contains a maximum time value. Following descriptions explain the meaning of this Attribute for each kind of ECU signals.  ECU Input si gnals: the specific functionality of this attribute is to limit the signals lifetime. The value defines the maximum allowed age for data of this signal. If the lifetime is 0, the signal has to be retrieved from the physical register, immediately. If the li fetime is greater than 0, the signal is valid for the specified time.  ECU Output signals: the specific functionality of this attribute is to limit the signal output to a maximum delay. The value defines the maximum allowed time until this signal is actuall y set. If delay is 0, then the signal has to be set to the physical register, immediately. If the delay is greater than 0, the signal can be set until the configured time has elapsed.

SWS_IoHwAb_00025 requirement

The I/O Hardware Abstraction shall be implemented as one or more instances of the EcuAbstractionSwCo mponentType .

SWS_IoHwAb_00032 requirement

[SWS_IoHwAb_00032] [SWS_IoHwAb_00033]

SWS_IoHwAb_00033 requirement

The implementation has to take into consideration, that the callback functions will be executed in interrupt context.

SWS_IoHwAb_00034 requirement

The number of available cal lback functions and the order of execution will be implementation dependent and must be documented in the I /O Hardware Abstraction BSWMD.

SWS_IoHwAb_00035 requirement

The I/O Hardware Abstraction may contain one or several job processing functions that are BswSchedulableEnt ities (a sub - class of BswModuleEntity by opposition to BswInterruptEntity, e.g. one for each device driver) . They shall be activated according to their use. They will be time - triggered by the BSW Scheduler. They could be synchronized to the execution of th e other runnable entities. The number of BswSchedulableEntities and their order of execution will be imple mentation dependent and must be documented in the I/O Hardware Abstraction description.

SWS_IoHwAb_00036 requirement

The I/O Hardware Abstraction shall define BswModuleEntries to exchange data with other software below the RTE outside interrupt context, for example in case of BSW init ialization/de - initialization.

SWS_IoHwAb_00037 requirement

The initialization/de - initialization functions shall be used/handled by the ECU State Manager, exclusively. For more information, refer to [10] . The number of available functions and the order of execution are implementation - d ependent and must be documented in the I/O Hardware Abstraction description.

SWS_IoHwAb_00038 requirement

Integration code usually means that this software is designed to suite a specific ECU hardware layout. All strategies to protect the hardware shall be included in this software. This document does not intend to standardize or give a recommendation for suc h hardware protection.

SWS_IoHwAb_00039 requirement

The I/O Hardware Abstraction shall not contain strategies for failure recovery. Failure recovery actions can only be decided by the responsible SWC.

SWS_IoHwAb_00044 requirement

[SWS_IoHwAb_00044]

SWS_IoHwAb_00059 requirement

This kind of function initializes eit her all the I/O Hardware Abstraction software, or a part of the I/O Hardware Abstraction.

SWS_IoHwAb_00060 requirement

The multiplicity of I/O devices managed by the I/O Hardware Abstraction software shall be handled via several init functions. Each init function shall be tagged with an <Init_ID>. Therefore, an external device, having its driver encapsulated inside the I/O Hardware Abstraction, can be separately initialized.

SWS_IoHwAb_00061 requirement

This kind of init function shall called by the ECU State Manager. The ECU integrator is able to configure the init sequence order called by the ECU State manager.

SWS_IoHwAb_00063 requirement

An ECU signal represents one electrical signal, which means at least one input or output ECU pin.

SWS_IoHwAb_00068 requirement

The implementation behind the service of the I/O Hardware Abstraction's Provide Ports is ECU specific and the mapping to the corresponding “PortInterface” shall be documented in the Software Component description.

SWS_IoHwAb_00069 requirement

For an ECU Signal associated with a PortInterface configured as an input signal, the I/O Hardware Abstraction shall provide a GET operation, and the operation short name can be freely choose.

SWS_IoHwAb_00075 requirement

The I/O Hardware Abstraction specification defines only recommendations for the Port usage. The in stantiation of the Ports shall be done during the configuration process and is specific to the ECU electronic design.

SWS_IoHwAb_00078 requirement

The I/O Hardware Abstraction implementation shall provide Software Components with access to all MCAL drivers.

SWS_IoHwAb_00079 requirement

The I/O Hardware Abstraction implementation shall provide Software Components with access to communication drivers (for instance by SPI), if on - board devices are managed.

SWS_IoHwAb_00097 requirement

The code file structure shall not be defined within this specification.

SWS_IoHwAb_00102 requirement

After having finished the module initialization, the I/O Hardware Abstraction state sha ll be set to IOHWAB_IDLE , the job result shall be set to IOHWAB_JOB_OK .

SWS_IoHwAb_00104 requirement

The functio n IoHwAb_AdcNotification<#groupID> is intended to be called by the ADC driver when a group conversion is completed for group <#groupID>.

SWS_IoHwAb_00105 requirement

The function IoHwAb_PwmNotifica tion<#channel> is intended to be called by the PWM driver when a signal edge occurs on channel <#channel>.

SWS_IoHwAb_00106 requirement

The function IoHwAb_IcuNotification<#channel> is intended to be called by the ICU driver when a signal edge occurs on channel <#channel>.

SWS_IoHwAb_00107 requirement

The function IoHwAb_GptNotification<#channel> is intended to be called by the GPT driver when a timer value expires on channel <#channel>.

SWS_IoHwAb_00136 requirement

This function allows controlling the associated ECU Signal, i.e. the ECU Signal can be locked, unlocked, and adjusted to a certain value.

SWS_IoHwAb_00138 requirement

This function shall be pre compile time configurable On/Off.

SWS_IoHwAb_00140 requirement

This function provides read access to a certain ECU Signal to the DCM module. The read access is independent from the ECU Signa l's current state (locked/unlocked) and shall always r ead the current physical value from the hardware.

SWS_IoHwAb_00142 requirement

This function shall be pre compile time configurable On/Off.

SWS_IoHwAb_00143 requirement

The function prototype for the callback function functions of the I/O Hardware Abstraction which are routed via RTE shall be implemented according to the following rule: StdReturnType R te_Call_<p>_<o>(<parameters>)

SWS_IoHwAb_00145 requirement

These requirements are not applicable to this specification.

SWS_IoHwAb_00149 requirement

This API is a configurable callout and shall be defined per configuration once per Power Mode to be managed.

SWS_IoHwAb_00150 requirement

This callout shall be executed in the context of the IoHwAbs SWC, meani ng that it has full access to the MCAL.

SWS_IoHwAb_00151 requirement

This API is a configurable callout and sha ll be defined per configuration once per Pow er Mode to be managed.

SWS_IoHwAb_00152 requirement

This callout shall be executed in the context of the IoHwAbs SWC, meaning that it has full access to the MCAL.

SWS_IoHwAb_00153 requirement

This API executes all power st ate transition prepared by the preceding cal l to the correposonding IoHwAb_PreparePowerState<#Mode>.

SWS_IoHwAb_00156 requirement

The function IoHwAb_OcuNotification<#channel> is intended to be called by the OCU driver when the current value of the counter matches the thre shold on channel <#channel>.

SWS_IoHwAb_00158 requirement

The Configuration pointer ConfigPtr shall always have a N ULL_PTR value

SWS_IoHwAb_91001 requirement

Type of error Related error code Error value Up to the implementer to define error he wants to report Up to the implementer 0x01

SWS_IoHwAb_91003 requirement

Adc _ Get Group - Status Adc.h Returns the conversion status of the requested ADC Channel group. Adc _ Get - Stream Last - Pointer Adc.h Returns the number of valid samples per channel, stored in the result buffer. Reads a pointer, pointing to a position in the group result buffer. With the pointer position, the results of all group channels of the last completed conversion round can be accessed. With the pointer and the return value, all valid group conversion results can be accessed (the user has to take the layout of the result buffer into account). Adc _ Read - Group Adc.h Reads the group conversion r esult of the last completed conversion round of the requested group and stores the channel values starting at the Data Buffer Ptr address. The group channel values are stored in ascending channel number order ( in contrast to the storage layout of the resu lt buffer if streaming access is configured). Adc _ Setup - Result Buffer Adc.h Initializes ADC driver with the group specific result buffer start address where the conversion results will be stored. The application has to ensure that the application buffer , where Data Buffer Ptr points to, can hold all the conversion results of the specified group. The initialization with Adc_ Setup Result Buffer is required after reset, before a group conversion can be started. Adc _ Start - Group - Conversion Adc.h Starts th e conversion of all channels of the requested ADC Channel group. Adc _ Stop - Group - Conversion Adc.h Stops the conversion of the requested ADC Channel group. Dio _ Read - Channel Dio.h Returns the value of the specified DIO channel. Dio _ Read - Channel Group Dio.h This Service reads a subset of the adjoining bits of a port. Dio _ Read Port Dio.h Returns the level of all channels of that port. Dio _ Write - Channel Dio.h Service to set a level of a channel. Dio _ Write - Channel Group Dio.h Service to set a sub set of the adjoining bits of a port to a specified level. Dio _ Write Port Dio.h Service to set a value of the port. Gpt _ Check - Wakeup Gpt.h Checks if a wakeup capable GPT channel is the source for a wakeup event and calls the ECU state manager service Ecu M_ Set Wakeup Event in case of a valid GPT channel wakeup event. Gpt _ Disable - Wakeup Gpt.h Disables the wakeup interrupt of a channel (rel evant in sleep mode). Gpt _ Enable - Wakeup Gpt.h Enables the wakeup interrupt of a channel (relevant in sleep mode). Gpt _ Get Time - Elapsed Gpt.h Returns the time already elapsed. Gpt _ Get Time - Remaining Gpt.h Returns the time remaining until the target time is reached. Gpt _ Set Mode Gpt.h Sets the operation mode of the GPT. Icu _ Disable - Edge Count Icu.h This function disables the counting of edges of the given channel. Icu _ Disable - Notification Icu.h This function disables the notification of a channel. Icu _ Disable - Wakeup Icu.h This function disables the wakeup capability of a single ICU channel. Icu _ Enable - Edge Count Icu.h This function enables the counting of edges of the given channel. Icu _ Enable - Notification Icu.h This function enables the notification on the given channel. Icu _ Enable - Wakeup Icu.h This function (re - )enables the wakeup capability of the given ICU channel. Icu _ Get Duty - Icu.h This function reads the coherent active time and period time for the Cycle Values given ICU Channel. Icu _ Get Edge - Numbers Icu.h This function reads the number of counted edges. Icu _ Get Input - State Icu.h This function returns the status of the ICU input. Icu _ Ge t Time - Elapsed Icu.h This function reads the elapsed Signal Low Time for the given channel. Icu _ Get - Timestamp - Index Icu.h This function reads the timestamp index of the given channel. Icu _ Reset Edge - Count Icu.h This function resets the value of the c ounted edges to zero. Icu _ Set - Activation - Condition Icu.h This function sets the activation - edge for the given channel. Icu _ Start Signal - Measurement Icu.h This function starts the measurement of signals. Icu _ Start - Timestamp Icu.h This function starts the capturing of timer values on the edges. Icu _ Stop Signal - Measurement Icu.h This function stops the measurement of signals of the given channel. Icu _ Stop - Timestamp Icu.h This function stops the timestamp measurement of the give n channel. Ocu _ Disable - Notification Ocu.h This service is used to disable notifications from an OCU channel. Ocu _ Enable - Notification Ocu.h This service is used to enable notifications from an OCU channel. Ocu _ Get - Counter Ocu.h Service to read the current value of the counter. Ocu _ Set - Absolute - Threshold Ocu.h Service to set the value of the channel threshold using an absolute input data. Ocu _ Set Pin - State Ocu.h Service to set immediately the level of the pin associated to a n OCU channel. Ocu _ Set - Relative - Threshold Ocu.h Service to set the value of the channel threshold relative to the current value of the counter. Ocu _ Start - Channel Ocu.h Service to start an OCU channel. Ocu _ Stop - Channel Ocu.h Service to stop an OCU channel. Port _ Refresh - Port.h Refreshes port direction. Port Direction Port _ Set Pin - Direction Port.h Sets the port pin direction Port _ Set Pin - Mode Port.h Sets the port pin mode. Pwm _ Get - Output State Pwm.h Service to read the internal state of the PWM output signal. Spi _ Async - Transmit Spi.h Service to transmit data on the SPI bus. Spi _ Cancel Spi.h Service cancels the specified on - going sequence transmission. Spi _ Get H W - Unit Status Spi.h This servic e returns the status of the specified SPI Hardware microcontroller peripheral. Spi _ Get Job - Result Spi.h This service returns the last transmission result of the specified Job. Spi _ Get - Sequence - Result Spi.h This service returns the last transmission result of the specified Sequence. Spi _ Get Status Spi.h Service returns the SPI Handler/ Driver software module status. Spi _ Main - Function _ - Handling Sch M_ Spi.h -- Spi _ Read I B Spi.h Service for reading s ynchronously one or more data from an IB SPI Handler/ Driver Channel specified by parameter. Spi _ Set Async - Mode Spi.h Service to set the asynchronous mechanism mode for SPI busses handled asynchronously. Spi _ Setup E B Spi.h Service to setup the buffe rs and the length of data for the EB SPI Handler/ Driver Channel specified. Spi _ Sync - Transmit Spi.h Service to transmit data on the SPI bus Spi _ Write I B Spi.h Service for writing one or more data to an IB SPI Handler/ Driver Channel specified by parameter.

SWS_IoHwAb_91004 requirement

Det _ Report Error Det.h Service to report development errors. Ecu M _ Set Wakeup Event Ecu M.h Sets the wakeup event.

SWS_IoHwAb_91005 requirement

Module Header File Imported Type Adc Adc.h Adc _ Group Type Adc.h Adc _ Status Type Adc.h Adc _ Stream Num Sample Type Adc.h Adc _ Value Group Type Dio Dio.h Dio _ Channel Group Type Dio.h Dio _ Channel Type Dio.h Dio _ Level Type Dio.h Dio _ Port Level Type Dio.h Dio _ Port Type Ecu M Ecu M.h Ecu M _ Wakeup Source Type Gpt Gpt.h Gpt _ Channel Type Gpt.h Gpt _ Mode Type Gpt.h Gpt _ Value Type Icu Icu.h Icu _ Activation Type Icu.h Icu _ Channel Type Icu.h Icu _ Duty Cycle Type Icu.h Icu _ Edge Number Type Icu.h Icu _ Index Type Icu.h Icu _ Input State Type Icu.h Icu _ Value Type Ocu Ocu.h Ocu _ Channel Type Ocu.h Ocu _ Pin State Type Ocu.h Ocu _ Return Type Ocu.h Ocu _ Value Type Port Port.h Port _ Pin Direction Type Port.h Port _ Pin Mode Type Port.h Port _ Pin Type Pwm Pwm.h Pwm _ Channel Type Pwm.h Pwm _ Output State Type Spi Spi.h Spi _ Async Mode Type Spi.h Spi _ Channel Type Spi.h Spi _ Data Buffer Type Spi.h Spi _ H W Unit Type Spi.h Spi _ Job Result Type Spi.h Spi _ Job Type Spi.h Spi _ Number Of Data Type Spi.h Spi _ Seq Result Type Spi.h Spi _ Sequence Type Spi.h Spi _ Status Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type