DEENESPTFRRUARHIKOZHNL

OCU Driver (Ocu)

ModulOcu (OCU Driver)
BSW-Modul-ID125
Standard-Header#include "Ocu.h"
SWS-SpezifikationAUTOSAR_CP_SWS_OCUDriver.pdf, AUTOSAR_SWS_OCUDriver.pdf
Umfang126 Records · 6 Snippets
ClusterMikrocontroller-Abstraktion (MCAL & I/O)

OCU Driver (Ocu)

AUTOSAR Classic I/O Drivers-Modul OCU Driver (Ocu, Spezifikation: AUTOSAR_CP_SWS_OCUDriver.pdf, AUTOSAR_SWS_OCUDriver.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

函数 Ocu_Init [SWS_Ocu_00035] 📄 PDF

void Ocu_Init(const Ocu_ConfigType* ConfigPtr);

Service for OCU initialization.

函数 Ocu_StopChannel [SWS_Ocu_00058] 📄 PDF

void Ocu_StopChannel(Ocu_ChannelType ChannelNumber);

Service to stop an OCU channel.

函数 Ocu_SetPinState [SWS_Ocu_00066] 📄 PDF

void Ocu_SetPinState(Ocu_ChannelType ChannelNumber, Ocu_PinStateType PinState);

Service to set immediately the level of the pin associated to an OCU channel.

函数 Ocu_SetPinAction [SWS_Ocu_00076] 📄 PDF

void Ocu_SetPinAction(Ocu_ChannelType ChannelNumber, Ocu_PinActionType PinAction);

Service to indicate the driver what shall be done automatically by hardware (if supported) upon compare match.

函数 Ocu_GetCounter [SWS_Ocu_00085] 📄 PDF

Ocu_ValueType Ocu_GetCounter(Ocu_ChannelType ChannelNumber);

Service to read the current value of the counter.

函数 Ocu_SetAbsoluteThreshold [SWS_Ocu_00091] 📄 PDF

Ocu_ReturnType Ocu_SetAbsoluteThreshold(Ocu_ChannelType ChannelNumber, Ocu_ValueType ReferenceValue, Ocu_ValueType AbsoluteValue);

Service to set the value of the channel threshold using an absolute input data.

函数 Ocu_SetRelativeThreshold [SWS_Ocu_00100] 📄 PDF

Ocu_ReturnType Ocu_SetRelativeThreshold(Ocu_ChannelType ChannelNumber, Ocu_ValueType RelativeValue);

Service to set the value of the channel threshold relative to the current value of the counter.

函数 Ocu_DisableNotification [SWS_Ocu_00108] 📄 PDF

void Ocu_DisableNotification(Ocu_ChannelType ChannelNumber);

This service is used to disable notifications from an OCU channel.

函数 Ocu_EnableNotification [SWS_Ocu_00115] 📄 PDF

void Ocu_EnableNotification(Ocu_ChannelType ChannelNumber);

This service is used to enable notifications from an OCU channel.

函数 Ocu_Notification_<Channel> [SWS_Ocu_00128] 📄 PDF

void Ocu_Notification_<Channel>(void);

This notification function is called when a compare match occurs on the associated channel.

类型 Ocu_ValueType [SWS_Ocu_00029] 📄 PDF

Type for reading the counter and writing the threshold values (in number of ticks).

类型 Ocu_PinActionType [SWS_Ocu_00032] 📄 PDF

Automatic action (by hardware) to be performed on a pin attached to an OCU channel. A vailable via Ocu.h

类型 Ocu_ConfigType [SWS_Ocu_00033] 📄 PDF

This is the type of the data structure containing the initialization data for the OCU driver.

requirement SWS_Ocu_00010 [SWS_Ocu_00010] 📄 PDF

If a free - running counter of the OCU cell can be used by another timer module then the Ocu driver must not start nor stop the free - running counter.

requirement SWS_Ocu_00011 [SWS_Ocu_00011] 📄 PDF

The API Ocu_Init shall start all free - running counters, which are exclusively used by this driver .

requirement SWS_Ocu_00012 [SWS_Ocu_00012] 📄 PDF

The O CU driver shall perform Inter Module Checks to avoid integration of incompatible files.The imported included files shall be checked by preprocessing directives. The following version numbers shall be verified: - <MODULENAME>_AR_RELEASE_MAJOR_VERSION - < MODULENAME>_AR_RELEASE_MINOR_VERSION Where <MODULENAME> is the module short name of the other (external) modules, which provide header files included by the OCU driver . If the values are not identical to the expected values, an error shall be reported.

requirement SWS_Ocu_00013 [SWS_Ocu_00013] 📄 PDF

All time units used within the API services of the OCU driver shall be of the unit ticks.

requirement SWS_Ocu_00016 [SWS_Ocu_00016] 📄 PDF

The following errors shall be detectable by the OCU driver depending on its build version (development / production mode).

requirement SWS_Ocu_00018 [SWS_Ocu_00018] 📄 PDF

The detection of development errors is configurable ( ON / OFF ) at pre - compile time. The switch OcuDevErrorDetectApi shall activate or deactivate the detection of all development errors.

requirement SWS_Ocu_00019 [SWS_Ocu_00019] 📄 PDF

of the detected errors can be found in chapter Error classification and chapter API specification .

requirement SWS_Ocu_00020 [SWS_Ocu_00020] 📄 PDF

[SWS_Ocu_00020] ⌈The detection of production errors cannot be switched off.⌋ (SRS_BSW_00339)

requirement SWS_Ocu_00023 [SWS_Ocu_00023] 📄 PDF

Each variable that shall be accessible by AUTOSAR Debugging, shall be defined as global variable.

requirement SWS_Ocu_00024 [SWS_Ocu_00024] 📄 PDF

All type definitions of variables which shall be debugged shall be accessible by the header file O cu .h.

requirement SWS_Ocu_00025 [SWS_Ocu_00025] 📄 PDF

The declaration of variables in the header file shall be such that it is possible to calculate the size of the variables by C - "sizeof".

requirement SWS_Ocu_00026 [SWS_Ocu_00026] 📄 PDF

Variables available for debugging shall be described in the respective OCU driver Description.

requirement SWS_Ocu_00027 [SWS_Ocu_00027] 📄 PDF

Module Header File Imported Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

requirement SWS_Ocu_00034 [SWS_Ocu_00034] 📄 PDF

Ocu _ConfigType is a type of data structure containing the initialization data for the OCU driver. Mandatory parameters:  Symbolic name for channel / channel ID  maximum value of the counter  Time resolution in number of ticks  Notification function  Default value of the threshold  Minimu m v alue of the counter Optional parameters (if supported by hardware):  count direction  Ouput pin ( level s, and possible automatic actions).  Hardware triggered events (ADC or DMA) .  Microcontroller OCU - specific HW properties (optional prescaler , clock s ettings if supported by hardware) .

requirement SWS_Ocu_00036 [SWS_Ocu_00036] 📄 PDF

T he function Ocu _Init shall initialize all inte rnals variables and the used Ocu structure of the microcontroller according to a configuration set referenced by ConfigPtr .

requirement SWS_Ocu_00037 [SWS_Ocu_00037] 📄 PDF

t he function Ocu _Init shall only initialize the configured resources and shall not touch resources that are not configured in the configuration file.

requirement SWS_Ocu_00038 [SWS_Ocu_00038] 📄 PDF

If the hardware allows for only one usage of the register (register dedicated only to the OCU resource) , the n the OCU driver i s responsible for initializing the register.

requirement SWS_Ocu_00043 [SWS_Ocu_00043] 📄 PDF

If development error detection is enabled for the OCU driver and the function Ocu_Init is called when the OCU driver and hardware are already initialized, the function Ocu_Init shall raise development error OCU_E_ALREADY_INITIALIZED and return without any action .

requirement SWS_Ocu_00044 [SWS_Ocu_00044] 📄 PDF

A re - initialization of the OCU driver by executing the function Ocu_Init requires a de - initial ization before by executing the function Ocu_DeInit .

requirement SWS_Ocu_00046 [SWS_Ocu_00046] 📄 PDF

The function Ocu_DeInit shall deinitialize the OCU variables and registers that were initialized by Ocu_Init to a state comparable to their power on reset state. Values of registers which are not writeable are excluded.

requirement SWS_Ocu_00047 [SWS_Ocu_00047] 📄 PDF

The function Ocu_DeInit shall disable all used int errupt s and notifications .

requirement SWS_Ocu_00048 [SWS_Ocu_00048] 📄 PDF

The function Ocu_DeInit shall influence only the peripherals which are allocated by static configuration and/or the runtime configuration set passed by the previous ca ll of Ocu_Init() .

requirement SWS_Ocu_00050 [SWS_Ocu_00050] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _DeInit shall raise the error OCU _E_UNINIT .

requirement SWS_Ocu_00052 [SWS_Ocu_00052] 📄 PDF

The function Ocu_StartChannel shall start an OCU channel by allowing all compare match configured a ctions to be performed.

requirement SWS_Ocu_00053 [SWS_Ocu_00053] 📄 PDF

The function Ocu_StartChannel shall be reentrant if it is called for different channels.

requirement SWS_Ocu_00054 [SWS_Ocu_00054] 📄 PDF

The state of the selected channel shall be set to “RUN N I NG” If the function Ocu_StartChannel has been succe ss fully performed .

requirement SWS_Ocu_00055 [SWS_Ocu_00055] 📄 PDF

If the function Ocu_StartChannel is called on a channel in the state " RU N NING” , then the function shall raise the error OCU _E_BUSY and return without any action.

requirement SWS_Ocu_00056 [SWS_Ocu_00056] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter Channel Number is invalid (not within the range specified by the configuration), the function Ocu_StartChannel shall raise the error OCU _ E_PARAM_INVALID_CHANNEL and return without any action.

requirement SWS_Ocu_00057 [SWS_Ocu_00057] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_StartChannel shall raise the error OCU_ E_UNINIT and return without any action.

requirement SWS_Ocu_00059 [SWS_Ocu_00059] 📄 PDF

The function Ocu_St op Channel shall st op an OCU channel by halting compare match configured act ions for this channel.

requirement SWS_Ocu_00060 [SWS_Ocu_00060] 📄 PDF

The function Ocu_StopChannel shall not stop the free - running counter associated with a channel .

requirement SWS_Ocu_00061 [SWS_Ocu_00061] 📄 PDF

The function Ocu_St op Channel shall be reentrant if it is called for different channels.

requirement SWS_Ocu_00062 [SWS_Ocu_00062] 📄 PDF

The state of the selected channel shall be set to “ STOPPED”if the function Ocu_St op Channel is successfully performed .

requirement SWS_Ocu_00063 [SWS_Ocu_00063] 📄 PDF

I f the function Ocu_StopChannel is called on a channel in the state "STOPPED", then the function shall leave without any action (no change of the channel state), and shall not raise a development error.

requirement SWS_Ocu_00064 [SWS_Ocu_00064] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_St op Channel shall raise the error OCU_ E_PARAM_INVALID_CHANNEL and return without any action.

requirement SWS_Ocu_00065 [SWS_Ocu_00065] 📄 PDF

If developm ent error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_St op Channel shall raise the error OCU_ E_UNINIT and return without any action.

requirement SWS_Ocu_00067 [SWS_Ocu_00067] 📄 PDF

The function Ocu_SetPinState shall set the pin associated with the channel to the level indicated by “PinState” .

requirement SWS_Ocu_00068 [SWS_Ocu_00068] 📄 PDF

The fuction Ocu_SetPinState shall be reentrant if it is called for different channels.

requirement SWS_Ocu_00069 [SWS_Ocu_00069] 📄 PDF

The fu n ction Ocu_SetPinState shall be used on ly if the channel is not in the RUNNING state.

requirement SWS_Ocu_00070 [SWS_Ocu_00070] 📄 PDF

The function Ocu_SetPinState shall be pre compile time configurable On/Off by the configuration parameter: Ocu SetPinState Api {OCU_SET_PIN_STATE_API}.

requirement SWS_Ocu_00071 [SWS_Ocu_00071] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetPinState shall raise the error OCU_ E_PARAM_INVALID_CHANNEL and return without any action.

requirement SWS_Ocu_00072 [SWS_Ocu_00072] 📄 PDF

If developmen t error detection is enabled for the OCU driver : If a pin is not associated with th e channel (not defined in the configuration of the channel ), the function Ocu_SetPinState shall raise the error OCU_E_PARAM_ NO _ PIN and return without any action.

requirement SWS_Ocu_00073 [SWS_Ocu_00073] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter PinState is invalid (not within the range specified by the configuration), the function Ocu_SetPinState shall raise the error OCU_E_PARAM_INVALID_ STATE and return without any action.

requirement SWS_Ocu_00074 [SWS_Ocu_00074] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Oc u_SetPinState shall raise the error OCU_ E_UNINIT and return without any action.

requirement SWS_Ocu_00075 [SWS_Ocu_00075] 📄 PDF

If development error detection is enabled for the OCU driver : If the channel is in the RUNNING state , the function Ocu_SetPinState shall raise the error OCU_E_PARAM_INVALID_STATE and return without any action.

requirement SWS_Ocu_00077 [SWS_Ocu_00077] 📄 PDF

The function Ocu_SetPinAction s hall set the action to be performed by hardware automatically , at the next compar e match in the corresponding OCU channel .

requirement SWS_Ocu_00078 [SWS_Ocu_00078] 📄 PDF

The fuction OCU Ocu_SetPinAction shall be reentrant if it is called for different channels.

requirement SWS_Ocu_00079 [SWS_Ocu_00079] 📄 PDF

The function Ocu_SetPinAction shall be pre compile time configurable by the configuration parameter: Ocu SetPinActionApi {OCU_SET_PIN_ACTION_API}.

requirement SWS_Ocu_00080 [SWS_Ocu_00080] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetPinAction shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any action.

requirement SWS_Ocu_00081 [SWS_Ocu_00081] 📄 PDF

If development error detection is enabled for the OCU driver : If a pin is not associated with th e channel (not defined in the configuration of the channel), the function Ocu_SetPin Action shall r aise the error OCU_E_PARAM_ NO _PIN and return without any action.

requirement SWS_Ocu_00082 [SWS_Ocu_00082] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter Pin Action is invalid (not within the range specified by the type ), the function Ocu_SetPin Action shall raise the error OCU_E_PARAM_INVALID_ ACTION and return without any action.

requirement SWS_Ocu_00083 [SWS_Ocu_00083] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_SetPinAction shall raise the error OCU_ E_UNINIT and return without any action.

requirement SWS_Ocu_00084 [SWS_Ocu_00084] 📄 PDF

If a pin is associated with a channel; the relevant action with this pin shall be performed upon compare match.

requirement SWS_Ocu_00086 [SWS_Ocu_00086] 📄 PDF

The function Ocu_GetCounter shall read and return the value of the counter of the channel indicated by ChannelNumber.

requirement SWS_Ocu_00088 [SWS_Ocu_00088] 📄 PDF

T he function Ocu_GetCounter shall be pre compile time configurable by the configuration parameter: OcuGetCounterApi {OCU_ GET_COUNTER_API }.

requirement SWS_Ocu_00089 [SWS_Ocu_00089] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_GetCounter shall raise the error OCU_E_PARAM_INVALID_CHANNEL and shall return the value “ 0 ”.

requirement SWS_Ocu_00090 [SWS_Ocu_00090] 📄 PDF

If development error detection is enabled for the OCU driver : i f the driver is not initialized, then the function Ocu_GetCounterValue shall raise the error OCU_E_UNINIT and shall return the value “ 0 ”.

requirement SWS_Ocu_00092 [SWS_Ocu_00092] 📄 PDF

The function Ocu_Set Absolute Threshold shall set the channel threshold (the compare value) to the value given by AbsoluteValue .

requirement SWS_Ocu_00093 [SWS_Ocu_00093] 📄 PDF

The fuction Ocu_ SetAbsoluteThreshold shall be reentrant if it is called for different channels .

requirement SWS_Ocu_00094 [SWS_Ocu_00094] 📄 PDF

The function Ocu_SetAbsoluteThreshold shall be pre compile time configurable On/Off by the configuration parameter: OcuSetAbsoluteThresholdApi {OCU_ SET _ ABSOLUTE_THRESHOLD_API }.

requirement SWS_Ocu_00095 [SWS_Ocu_00095] 📄 PDF

If development error detection is enabled for the OCU dr iver : If the driver is not initialized, the function Ocu_SetAbsoluteThreshold shall raise the error OCU_E_UNINIT and return without any action.

requirement SWS_Ocu_00096 [SWS_Ocu_00096] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu _ SetAbsoluteThreshold shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any action.

requirement SWS_Ocu_00097 [SWS_Ocu_00097] 📄 PDF

Upon actual setting of a new threshold value, the previous threshold value (written during the last call of this API) shall no longer produce a compare match.

requirement SWS_Ocu_00098 [SWS_Ocu_00098] 📄 PDF

After setting a new threshold value, the API Ocu_SetAbsoluteThreshold shall return a status to inform the caller whether the compare match will occur (or has already occured) during the current Reference Interval , as a result of setting the new threshold value.

requirement SWS_Ocu_00101 [SWS_Ocu_00101] 📄 PDF

The function Ocu_ Set Relative Threshold shall add RelativeValue to the value of the counter on entering the function to compute the new threshold relative to the counter .

requirement SWS_Ocu_00102 [SWS_Ocu_00102] 📄 PDF

The fuction OCU Ocu_SetAbsoluteThreshold shall be reentrant if it is called for different channels .

requirement SWS_Ocu_00103 [SWS_Ocu_00103] 📄 PDF

The function Ocu_SetRelativeThreshold shall be pre compile time configurable On/Off by the configuration parameter: Ocu SetRelative Threshold Api { OCU_SET_ RELATIVE_ THRESHOLD_API } .

requirement SWS_Ocu_00104 [SWS_Ocu_00104] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _ SetRelativeThreshold shall raise the error OCU_E_UNINIT and return without any action.

requirement SWS_Ocu_00105 [SWS_Ocu_00105] 📄 PDF

If development error detection is enabled for the OCU driver : i f the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetRelativeThreshold shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any a ction.

requirement SWS_Ocu_00106 [SWS_Ocu_00106] 📄 PDF

After setting a new threshold value, the API Ocu_SetRelativeThreshold shall return a status to inform the caller whether the compare match will occur (or has already occured) during the current Reference Interval , as a result of setting the new threshold value.

requirement SWS_Ocu_00107 [SWS_Ocu_00107] 📄 PDF

Upon actual setting of a new threshold va lue (absolute or relative), the previous threshold value shall no longer produce a compare match.

requirement SWS_Ocu_00109 [SWS_Ocu_00109] 📄 PDF

The function Ocu _DisableNo tification shall disable the OCU compare match notification .

requirement SWS_Ocu_00110 [SWS_Ocu_00110] 📄 PDF

The fuction OCU Ocu_DisableNotification shall be reentrant if it is called for different channels .

requirement SWS_Ocu_00111 [SWS_Ocu_00111] 📄 PDF

The function Ocu _DisableNotification shall be pre compile time configurable On/Off by the configuration parameter: OcuNotificationSupported {OCU _NOTIFICATION_SUPPORTED}.

requirement SWS_Ocu_00112 [SWS_Ocu_00112] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _DisableNotification shall raise the error OCU _E_UNINIT and re t urn without any action.

requirement SWS_Ocu_00113 [SWS_Ocu_00113] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter Channel is invalid (not within the range specified by configuration), the function Ocu _DisableNotification shall raise the error OCU_E_PARAM_INVALID _CHANNEL and return without any action .

requirement SWS_Ocu_00114 [SWS_Ocu_00114] 📄 PDF

If development error detection is enabled for the OCU driver : If the notification function is the NULL pointer , the function Ocu _DisableNotification shall raise the error OCU_ E_ NO_VALID_NOTIF and re t urn without any action .

requirement SWS_Ocu_00116 [SWS_Ocu_00116] 📄 PDF

The function Ocu_ EnableNotification shall en able the OCU compare match notification of the indexed channel.

requirement SWS_Ocu_00117 [SWS_Ocu_00117] 📄 PDF

The function Ocu_EnableNotification shall be reentrant if it is called for different channels.

requirement SWS_Ocu_00118 [SWS_Ocu_00118] 📄 PDF

The function Ocu_ EnableNotification shall be pre compile time configurable On/Off by the configuration parameter: OcuNotificationSupported {OCU_NOTIFICATION_SUPPORTED} .

requirement SWS_Ocu_00119 [SWS_Ocu_00119] 📄 PDF

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_ EnableNotification shall raise the error OCU_E_UNINIT and re t urn without any action.

requirement SWS_Ocu_00120 [SWS_Ocu_00120] 📄 PDF

If development error detection is enabled for the OCU driver : If the parameter Channel is invalid (not within the range specified by configuration), then the function Ocu_ EnableNotification shall raise the error OCU_E_PARAM_INVALID _CHANNEL and return without any action .

requirement SWS_Ocu_00121 [SWS_Ocu_00121] 📄 PDF

If development error detection is enabled for the OCU driver : If the notification function is the NULL pointer, the function Ocu_ EnableNotification shall raise the error OCU_E_NO_VALID_NOTIF and return without any action .

requirement SWS_Ocu_00123 [SWS_Ocu_00123] 📄 PDF

The function Ocu _GetVersionInfo shall return the version information of this module. The version information includes: - Module Id - Vendor Id - Vendor specific version numbers .

requirement SWS_Ocu_00124 [SWS_Ocu_00124] 📄 PDF

The function Ocu _GetVersionInfo shall be pre compile time configurable On/Off by the configuration parameter: Ocu VersionInfoApi { OCU _VERSION_INFO_API}.

requirement SWS_Ocu_00125 [SWS_Ocu_00125] 📄 PDF

If source c ode for caller and callee of Ocu _GetVersionInfo is available; the OCU driver shou ld realize Ocu _GetVersionInfo as a macro, defined in the module’s header file .

requirement SWS_Ocu_00126 [SWS_Ocu_00126] 📄 PDF

If development error detection is enabled for the OCU driver , the function Ocu_GetVersionInfo shall raise development error OCU_E_PARAM_POINTER if parameter versioninfo is a null pointer, and return without any action

requirement SWS_Ocu_00129 [SWS_Ocu_00129] 📄 PDF

The OCU driver shall call the function Ocu _Notification _< Channel # > according to the last call of Ocu _EnableNotification /Ocu_DisableNotification for channel < Channel # > , if there’s a compare match on that channel .

requirement SWS_Ocu_00130 [SWS_Ocu_00130] 📄 PDF

The OCU driver shall reset the interrupt flag (if needed by hardware) as sociated with the notification Ocu _Notification_< Channel # >

requirement SWS_Ocu_00131 [SWS_Ocu_00131] 📄 PDF

The O cu notification functions shall be configurable as function pointers within the initialization data structure ( Oc u_ConfigType ).

requirement SWS_Ocu_00132 [SWS_Ocu_00132] 📄 PDF

⌈ If the NULL pointer is configured for a notification call - back, then no call - back shall be executed.

requirement SWS_Ocu_00133 [SWS_Ocu_00133] 📄 PDF

When the notification mechanism is disabled, the OCU driver shall send no notification.

requirement SWS_Ocu_00136 [SWS_Ocu_00136] 📄 PDF

The API Ocu_ DeI nit shall stop all free - running counters, which are exclusively used by this driver.

requirement SWS_Ocu_00137 [SWS_Ocu_00137] 📄 PDF

If development error detection is enabled for the OCU driver: i f a channel is still in the RUNNING state when the function Ocu_DeInit is called, then the function sh all raise the development error ‘ OCU_E_PARAM_INVALID_STATE ’ and return without any action.

requirement SWS_Ocu_00170 [SWS_Ocu_00170] 📄 PDF

The OCU module shall reject configurations with partition mappings which are not s upported by the implementation.

requirement SWS_Ocu_91001 [SWS_Ocu_91001] 📄 PDF

Type of error Related error code Error value API services other than Ocu_ Get Version Info() and Ocu_ init() used without module initialization OCU_ E_ UNINIT 0x02 API service used with an invalid channel Identifier. OCU_ E_ PARAM_ INVALID_ CHANNEL 0x03 API Ocu_ Set Pin State() called with an invalid pin state or when the channel is in the RUNNING state. OCU_ E_ PARAM_ INVALID_ STATE 0x04 API Ocu_ Set Pin Action() called with an invalid pin action. OCU_ E_ PARAM_ INV ALID_ ACTION 0x05 Usage of Ocu_ Disable Notification() or Ocu_ Enable Notification() on a channel where a NULL pointer is configured as the notification function. OCU_ E_ NO_ VALID_ NOTIF 0x06 API Ocu_ Init() called while the OCU driver has already been initialized OCU_ E_ ALREADY_ INITIALIZED 0x07 API Ocu_ Get Version Info() is called with a NULL parameter. OCU_ E_ PARAM_ POINTER 0x08 Ocu_ Set Pin State() or Ocu_ Set Pin Action() called for a channel that doesn't have an associated output pin. OCU_ E_ PARAM_ NO_ PIN 0x0A OCU initialization has been failed, e.g. selected configuration set doesn't exist. OCU_ E_ INIT_ FAILED 0x0B

requirement SWS_Ocu_91002 [SWS_Ocu_91002] 📄 PDF

Type of error Related error code Error value API Ocu_ Start Channel() called on a channel that is in state RUNNING OCU_ E_ BUSY 0x09

requirement SWS_Ocu_CONSTR_00001 [SWS_Ocu_CONSTR_00001] 📄 PDF

The ECUC partitions referenced by OcuKernelEcucPartitionRef shall be a subset of the ECUC partitions referenced by OcuEcucPartitionRef.

requirement SWS_Ocu_CONSTR_00002 [SWS_Ocu_CONSTR_00002] 📄 PDF

The ECUC partitions referenced by OcuChannelEcucPartitionRef shall be a subset of the ECUC partitions referenced by OcuEcucPartitionRef.

requirement SWS_Ocu_CONSTR_00004 [SWS_Ocu_CONSTR_00004] 📄 PDF

If OcuEcucPartitionRef references one or more ECUC partitions, OcuKernelEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well

requirement SWS_Ocu_CONSTR_00005 [SWS_Ocu_CONSTR_00005] 📄 PDF

If OcuEcucPartitionRef references one or more ECUC partitions, OcuKernelEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well

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

Record
AUTOSAR/AP/record/CP_MOD_Ocu
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Ocu@rel:R20-11#a52a2548
Content hash
a52a2548
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_OCUDriver.pdf#nameddest=SWS_Ocu_00035

主题图

详细视图

请在大纲中选择一个条目。

初始化与状态

Ocu_DeInit 函数

This function de - initializes the OCU module.

void Ocu_DeInit(void);

This service returns the version information of this module.

void Ocu_GetVersionInfo(Std_VersionInfoType* versioninfo);
Ocu_Init 函数

Service for OCU initialization.

void Ocu_Init(const Ocu_ConfigType* ConfigPtr);

服务

This service is used to disable notifications from an OCU channel.

void Ocu_DisableNotification(Ocu_ChannelType ChannelNumber);

This service is used to enable notifications from an OCU channel.

void Ocu_EnableNotification(Ocu_ChannelType ChannelNumber);

Service to read the current value of the counter.

Ocu_ValueType Ocu_GetCounter(Ocu_ChannelType ChannelNumber);

This notification function is called when a compare match occurs on the associated channel.

void Ocu_Notification_<Channel>(void);

Service to set the value of the channel threshold using an absolute input data.

Ocu_ReturnType Ocu_SetAbsoluteThreshold(Ocu_ChannelType ChannelNumber, Ocu_ValueType ReferenceValue, Ocu_ValueType AbsoluteValue);

Service to indicate the driver what shall be done automatically by hardware (if supported) upon compare match.

void Ocu_SetPinAction(Ocu_ChannelType ChannelNumber, Ocu_PinActionType PinAction);

Service to set immediately the level of the pin associated to an OCU channel.

void Ocu_SetPinState(Ocu_ChannelType ChannelNumber, Ocu_PinStateType PinState);

Service to set the value of the channel threshold relative to the current value of the counter.

Ocu_ReturnType Ocu_SetRelativeThreshold(Ocu_ChannelType ChannelNumber, Ocu_ValueType RelativeValue);

Service to start an OCU channel.

Std_ReturnType Ocu_StartChannel(Ocu_ChannelType ChannelNumber);

Service to stop an OCU channel.

void Ocu_StopChannel(Ocu_ChannelType ChannelNumber);

类型

Numeric identifier of an OCU channel.

This is the type of the data structure containing the initialization data for the OCU driver.

Automatic action (by hardware) to be performed on a pin attached to an OCU channel. A vailable via Ocu.h

Output state of the pin linked to an OCU channel.

Return information after setting a new threshold value.

Type for reading the counter and writing the threshold values (in number of ticks).

需求

SWS_Ocu_00006 requirement

Ocu .c shall include Ocu .h and Det.h .

SWS_Ocu_00010 requirement

If a free - running counter of the OCU cell can be used by another timer module then the Ocu driver must not start nor stop the free - running counter.

SWS_Ocu_00011 requirement

The API Ocu_Init shall start all free - running counters, which are exclusively used by this driver .

SWS_Ocu_00012 requirement

The O CU driver shall perform Inter Module Checks to avoid integration of incompatible files.The imported included files shall be checked by preprocessing directives. The following version numbers shall be verified: - <MODULENAME>_AR_RELEASE_MAJOR_VERSION - < MODULENAME>_AR_RELEASE_MINOR_VERSION Where <MODULENAME> is the module short name of the other (external) modules, which provide header files included by the OCU driver . If the values are not identical to the expected values, an error shall be reported.

SWS_Ocu_00013 requirement

All time units used within the API services of the OCU driver shall be of the unit ticks.

SWS_Ocu_00015 requirement

Development error values are of type uint8 .

SWS_Ocu_00016 requirement

The following errors shall be detectable by the OCU driver depending on its build version (development / production mode).

SWS_Ocu_00018 requirement

The detection of development errors is configurable ( ON / OFF ) at pre - compile time. The switch OcuDevErrorDetectApi shall activate or deactivate the detection of all development errors.

SWS_Ocu_00019 requirement

of the detected errors can be found in chapter Error classification and chapter API specification .

SWS_Ocu_00020 requirement

[SWS_Ocu_00020] ⌈The detection of production errors cannot be switched off.⌋ (SRS_BSW_00339)

SWS_Ocu_00023 requirement

Each variable that shall be accessible by AUTOSAR Debugging, shall be defined as global variable.

SWS_Ocu_00024 requirement

All type definitions of variables which shall be debugged shall be accessible by the header file O cu .h.

SWS_Ocu_00025 requirement

The declaration of variables in the header file shall be such that it is possible to calculate the size of the variables by C - "sizeof".

SWS_Ocu_00026 requirement

Variables available for debugging shall be described in the respective OCU driver Description.

SWS_Ocu_00027 requirement

Module Header File Imported Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

SWS_Ocu_00034 requirement

Ocu _ConfigType is a type of data structure containing the initialization data for the OCU driver. Mandatory parameters:  Symbolic name for channel / channel ID  maximum value of the counter  Time resolution in number of ticks  Notification function  Default value of the threshold  Minimu m v alue of the counter Optional parameters (if supported by hardware):  count direction  Ouput pin ( level s, and possible automatic actions).  Hardware triggered events (ADC or DMA) .  Microcontroller OCU - specific HW properties (optional prescaler , clock s ettings if supported by hardware) .

SWS_Ocu_00036 requirement

T he function Ocu _Init shall initialize all inte rnals variables and the used Ocu structure of the microcontroller according to a configuration set referenced by ConfigPtr .

SWS_Ocu_00037 requirement

t he function Ocu _Init shall only initialize the configured resources and shall not touch resources that are not configured in the configuration file.

SWS_Ocu_00038 requirement

If the hardware allows for only one usage of the register (register dedicated only to the OCU resource) , the n the OCU driver i s responsible for initializing the register.

SWS_Ocu_00039 requirement

The funct ion Ocu _Init shall stop all channels .

SWS_Ocu_00040 requirement

The function Ocu _Init shall disable all notifications.

SWS_Ocu_00043 requirement

If development error detection is enabled for the OCU driver and the function Ocu_Init is called when the OCU driver and hardware are already initialized, the function Ocu_Init shall raise development error OCU_E_ALREADY_INITIALIZED and return without any action .

SWS_Ocu_00044 requirement

A re - initialization of the OCU driver by executing the function Ocu_Init requires a de - initial ization before by executing the function Ocu_DeInit .

SWS_Ocu_00046 requirement

The function Ocu_DeInit shall deinitialize the OCU variables and registers that were initialized by Ocu_Init to a state comparable to their power on reset state. Values of registers which are not writeable are excluded.

SWS_Ocu_00047 requirement

The function Ocu_DeInit shall disable all used int errupt s and notifications .

SWS_Ocu_00048 requirement

The function Ocu_DeInit shall influence only the peripherals which are allocated by static configuration and/or the runtime configuration set passed by the previous ca ll of Ocu_Init() .

SWS_Ocu_00050 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _DeInit shall raise the error OCU _E_UNINIT .

SWS_Ocu_00052 requirement

The function Ocu_StartChannel shall start an OCU channel by allowing all compare match configured a ctions to be performed.

SWS_Ocu_00053 requirement

The function Ocu_StartChannel shall be reentrant if it is called for different channels.

SWS_Ocu_00054 requirement

The state of the selected channel shall be set to “RUN N I NG” If the function Ocu_StartChannel has been succe ss fully performed .

SWS_Ocu_00055 requirement

If the function Ocu_StartChannel is called on a channel in the state " RU N NING” , then the function shall raise the error OCU _E_BUSY and return without any action.

SWS_Ocu_00056 requirement

If development error detection is enabled for the OCU driver : If the parameter Channel Number is invalid (not within the range specified by the configuration), the function Ocu_StartChannel shall raise the error OCU _ E_PARAM_INVALID_CHANNEL and return without any action.

SWS_Ocu_00057 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_StartChannel shall raise the error OCU_ E_UNINIT and return without any action.

SWS_Ocu_00059 requirement

The function Ocu_St op Channel shall st op an OCU channel by halting compare match configured act ions for this channel.

SWS_Ocu_00060 requirement

The function Ocu_StopChannel shall not stop the free - running counter associated with a channel .

SWS_Ocu_00061 requirement

The function Ocu_St op Channel shall be reentrant if it is called for different channels.

SWS_Ocu_00062 requirement

The state of the selected channel shall be set to “ STOPPED”if the function Ocu_St op Channel is successfully performed .

SWS_Ocu_00063 requirement

I f the function Ocu_StopChannel is called on a channel in the state "STOPPED", then the function shall leave without any action (no change of the channel state), and shall not raise a development error.

SWS_Ocu_00064 requirement

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_St op Channel shall raise the error OCU_ E_PARAM_INVALID_CHANNEL and return without any action.

SWS_Ocu_00065 requirement

If developm ent error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_St op Channel shall raise the error OCU_ E_UNINIT and return without any action.

SWS_Ocu_00067 requirement

The function Ocu_SetPinState shall set the pin associated with the channel to the level indicated by “PinState” .

SWS_Ocu_00068 requirement

The fuction Ocu_SetPinState shall be reentrant if it is called for different channels.

SWS_Ocu_00069 requirement

The fu n ction Ocu_SetPinState shall be used on ly if the channel is not in the RUNNING state.

SWS_Ocu_00070 requirement

The function Ocu_SetPinState shall be pre compile time configurable On/Off by the configuration parameter: Ocu SetPinState Api {OCU_SET_PIN_STATE_API}.

SWS_Ocu_00071 requirement

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetPinState shall raise the error OCU_ E_PARAM_INVALID_CHANNEL and return without any action.

SWS_Ocu_00072 requirement

If developmen t error detection is enabled for the OCU driver : If a pin is not associated with th e channel (not defined in the configuration of the channel ), the function Ocu_SetPinState shall raise the error OCU_E_PARAM_ NO _ PIN and return without any action.

SWS_Ocu_00073 requirement

If development error detection is enabled for the OCU driver : If the parameter PinState is invalid (not within the range specified by the configuration), the function Ocu_SetPinState shall raise the error OCU_E_PARAM_INVALID_ STATE and return without any action.

SWS_Ocu_00074 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Oc u_SetPinState shall raise the error OCU_ E_UNINIT and return without any action.

SWS_Ocu_00075 requirement

If development error detection is enabled for the OCU driver : If the channel is in the RUNNING state , the function Ocu_SetPinState shall raise the error OCU_E_PARAM_INVALID_STATE and return without any action.

SWS_Ocu_00077 requirement

The function Ocu_SetPinAction s hall set the action to be performed by hardware automatically , at the next compar e match in the corresponding OCU channel .

SWS_Ocu_00078 requirement

The fuction OCU Ocu_SetPinAction shall be reentrant if it is called for different channels.

SWS_Ocu_00079 requirement

The function Ocu_SetPinAction shall be pre compile time configurable by the configuration parameter: Ocu SetPinActionApi {OCU_SET_PIN_ACTION_API}.

SWS_Ocu_00080 requirement

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetPinAction shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any action.

SWS_Ocu_00081 requirement

If development error detection is enabled for the OCU driver : If a pin is not associated with th e channel (not defined in the configuration of the channel), the function Ocu_SetPin Action shall r aise the error OCU_E_PARAM_ NO _PIN and return without any action.

SWS_Ocu_00082 requirement

If development error detection is enabled for the OCU driver : If the parameter Pin Action is invalid (not within the range specified by the type ), the function Ocu_SetPin Action shall raise the error OCU_E_PARAM_INVALID_ ACTION and return without any action.

SWS_Ocu_00083 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_SetPinAction shall raise the error OCU_ E_UNINIT and return without any action.

SWS_Ocu_00084 requirement

If a pin is associated with a channel; the relevant action with this pin shall be performed upon compare match.

SWS_Ocu_00086 requirement

The function Ocu_GetCounter shall read and return the value of the counter of the channel indicated by ChannelNumber.

SWS_Ocu_00087 requirement

The function Ocu_GetCounter shall be re - entrant .

SWS_Ocu_00088 requirement

T he function Ocu_GetCounter shall be pre compile time configurable by the configuration parameter: OcuGetCounterApi {OCU_ GET_COUNTER_API }.

SWS_Ocu_00089 requirement

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_GetCounter shall raise the error OCU_E_PARAM_INVALID_CHANNEL and shall return the value “ 0 ”.

SWS_Ocu_00090 requirement

If development error detection is enabled for the OCU driver : i f the driver is not initialized, then the function Ocu_GetCounterValue shall raise the error OCU_E_UNINIT and shall return the value “ 0 ”.

SWS_Ocu_00092 requirement

The function Ocu_Set Absolute Threshold shall set the channel threshold (the compare value) to the value given by AbsoluteValue .

SWS_Ocu_00093 requirement

The fuction Ocu_ SetAbsoluteThreshold shall be reentrant if it is called for different channels .

SWS_Ocu_00094 requirement

The function Ocu_SetAbsoluteThreshold shall be pre compile time configurable On/Off by the configuration parameter: OcuSetAbsoluteThresholdApi {OCU_ SET _ ABSOLUTE_THRESHOLD_API }.

SWS_Ocu_00095 requirement

If development error detection is enabled for the OCU dr iver : If the driver is not initialized, the function Ocu_SetAbsoluteThreshold shall raise the error OCU_E_UNINIT and return without any action.

SWS_Ocu_00096 requirement

If development error detection is enabled for the OCU driver : If the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu _ SetAbsoluteThreshold shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any action.

SWS_Ocu_00097 requirement

Upon actual setting of a new threshold value, the previous threshold value (written during the last call of this API) shall no longer produce a compare match.

SWS_Ocu_00098 requirement

After setting a new threshold value, the API Ocu_SetAbsoluteThreshold shall return a status to inform the caller whether the compare match will occur (or has already occured) during the current Reference Interval , as a result of setting the new threshold value.

SWS_Ocu_00101 requirement

The function Ocu_ Set Relative Threshold shall add RelativeValue to the value of the counter on entering the function to compute the new threshold relative to the counter .

SWS_Ocu_00102 requirement

The fuction OCU Ocu_SetAbsoluteThreshold shall be reentrant if it is called for different channels .

SWS_Ocu_00103 requirement

The function Ocu_SetRelativeThreshold shall be pre compile time configurable On/Off by the configuration parameter: Ocu SetRelative Threshold Api { OCU_SET_ RELATIVE_ THRESHOLD_API } .

SWS_Ocu_00104 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _ SetRelativeThreshold shall raise the error OCU_E_UNINIT and return without any action.

SWS_Ocu_00105 requirement

If development error detection is enabled for the OCU driver : i f the parameter ChannelNumber is invalid (not within the range specified by the configuration), the function Ocu_SetRelativeThreshold shall raise the error OCU_E_PARAM_INVALID_CHANNEL and return without any a ction.

SWS_Ocu_00106 requirement

After setting a new threshold value, the API Ocu_SetRelativeThreshold shall return a status to inform the caller whether the compare match will occur (or has already occured) during the current Reference Interval , as a result of setting the new threshold value.

SWS_Ocu_00107 requirement

Upon actual setting of a new threshold va lue (absolute or relative), the previous threshold value shall no longer produce a compare match.

SWS_Ocu_00109 requirement

The function Ocu _DisableNo tification shall disable the OCU compare match notification .

SWS_Ocu_00110 requirement

The fuction OCU Ocu_DisableNotification shall be reentrant if it is called for different channels .

SWS_Ocu_00111 requirement

The function Ocu _DisableNotification shall be pre compile time configurable On/Off by the configuration parameter: OcuNotificationSupported {OCU _NOTIFICATION_SUPPORTED}.

SWS_Ocu_00112 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu _DisableNotification shall raise the error OCU _E_UNINIT and re t urn without any action.

SWS_Ocu_00113 requirement

If development error detection is enabled for the OCU driver : If the parameter Channel is invalid (not within the range specified by configuration), the function Ocu _DisableNotification shall raise the error OCU_E_PARAM_INVALID _CHANNEL and return without any action .

SWS_Ocu_00114 requirement

If development error detection is enabled for the OCU driver : If the notification function is the NULL pointer , the function Ocu _DisableNotification shall raise the error OCU_ E_ NO_VALID_NOTIF and re t urn without any action .

SWS_Ocu_00116 requirement

The function Ocu_ EnableNotification shall en able the OCU compare match notification of the indexed channel.

SWS_Ocu_00117 requirement

The function Ocu_EnableNotification shall be reentrant if it is called for different channels.

SWS_Ocu_00118 requirement

The function Ocu_ EnableNotification shall be pre compile time configurable On/Off by the configuration parameter: OcuNotificationSupported {OCU_NOTIFICATION_SUPPORTED} .

SWS_Ocu_00119 requirement

If development error detection is enabled for the OCU driver : If the driver is not initialized, the function Ocu_ EnableNotification shall raise the error OCU_E_UNINIT and re t urn without any action.

SWS_Ocu_00120 requirement

If development error detection is enabled for the OCU driver : If the parameter Channel is invalid (not within the range specified by configuration), then the function Ocu_ EnableNotification shall raise the error OCU_E_PARAM_INVALID _CHANNEL and return without any action .

SWS_Ocu_00121 requirement

If development error detection is enabled for the OCU driver : If the notification function is the NULL pointer, the function Ocu_ EnableNotification shall raise the error OCU_E_NO_VALID_NOTIF and return without any action .

SWS_Ocu_00123 requirement

The function Ocu _GetVersionInfo shall return the version information of this module. The version information includes: - Module Id - Vendor Id - Vendor specific version numbers .

SWS_Ocu_00124 requirement

The function Ocu _GetVersionInfo shall be pre compile time configurable On/Off by the configuration parameter: Ocu VersionInfoApi { OCU _VERSION_INFO_API}.

SWS_Ocu_00125 requirement

If source c ode for caller and callee of Ocu _GetVersionInfo is available; the OCU driver shou ld realize Ocu _GetVersionInfo as a macro, defined in the module’s header file .

SWS_Ocu_00126 requirement

If development error detection is enabled for the OCU driver , the function Ocu_GetVersionInfo shall raise development error OCU_E_PARAM_POINTER if parameter versioninfo is a null pointer, and return without any action

SWS_Ocu_00127 requirement

Det _ Report Error Det.h Service to report development errors.

SWS_Ocu_00129 requirement

The OCU driver shall call the function Ocu _Notification _< Channel # > according to the last call of Ocu _EnableNotification /Ocu_DisableNotification for channel < Channel # > , if there’s a compare match on that channel .

SWS_Ocu_00130 requirement

The OCU driver shall reset the interrupt flag (if needed by hardware) as sociated with the notification Ocu _Notification_< Channel # >

SWS_Ocu_00131 requirement

The O cu notification functions shall be configurable as function pointers within the initialization data structure ( Oc u_ConfigType ).

SWS_Ocu_00132 requirement

⌈ If the NULL pointer is configured for a notification call - back, then no call - back shall be executed.

SWS_Ocu_00133 requirement

When the notification mechanism is disabled, the OCU driver shall send no notification.

SWS_Ocu_00136 requirement

The API Ocu_ DeI nit shall stop all free - running counters, which are exclusively used by this driver.

SWS_Ocu_00137 requirement

If development error detection is enabled for the OCU driver: i f a channel is still in the RUNNING state when the function Ocu_DeInit is called, then the function sh all raise the development error ‘ OCU_E_PARAM_INVALID_STATE ’ and return without any action.

SWS_Ocu_00170 requirement

The OCU module shall reject configurations with partition mappings which are not s upported by the implementation.

SWS_Ocu_91001 requirement

Type of error Related error code Error value API services other than Ocu_ Get Version Info() and Ocu_ init() used without module initialization OCU_ E_ UNINIT 0x02 API service used with an invalid channel Identifier. OCU_ E_ PARAM_ INVALID_ CHANNEL 0x03 API Ocu_ Set Pin State() called with an invalid pin state or when the channel is in the RUNNING state. OCU_ E_ PARAM_ INVALID_ STATE 0x04 API Ocu_ Set Pin Action() called with an invalid pin action. OCU_ E_ PARAM_ INV ALID_ ACTION 0x05 Usage of Ocu_ Disable Notification() or Ocu_ Enable Notification() on a channel where a NULL pointer is configured as the notification function. OCU_ E_ NO_ VALID_ NOTIF 0x06 API Ocu_ Init() called while the OCU driver has already been initialized OCU_ E_ ALREADY_ INITIALIZED 0x07 API Ocu_ Get Version Info() is called with a NULL parameter. OCU_ E_ PARAM_ POINTER 0x08 Ocu_ Set Pin State() or Ocu_ Set Pin Action() called for a channel that doesn't have an associated output pin. OCU_ E_ PARAM_ NO_ PIN 0x0A OCU initialization has been failed, e.g. selected configuration set doesn't exist. OCU_ E_ INIT_ FAILED 0x0B

SWS_Ocu_91002 requirement

Type of error Related error code Error value API Ocu_ Start Channel() called on a channel that is in state RUNNING OCU_ E_ BUSY 0x09

The ECUC partitions referenced by OcuKernelEcucPartitionRef shall be a subset of the ECUC partitions referenced by OcuEcucPartitionRef.

The ECUC partitions referenced by OcuChannelEcucPartitionRef shall be a subset of the ECUC partitions referenced by OcuEcucPartitionRef.

If OcuEcucPartitionRef references one or more ECUC partitions, OcuKernelEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well

If OcuEcucPartitionRef references one or more ECUC partitions, OcuKernelEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well