SNIP_CLASSIC_CAN_SECTION_8_3_2_2_Can_SetControllerMode
Wortlaut
8.3.2.2 Can_SetControllerMode
[SWS_Can_00230] Definition of API function Can_SetControllerMode ⌈
Service Name
Can_SetControllerMode
Syntax
Std_ReturnType Can_SetControllerMode (
uint8 Controller,
Can_ControllerStateType Transition
)
Service ID [hex]
0x03
Sync/Async
Asynchronous
Reentrancy
Non Reentrant
Controller
CAN controller for which the status shall be changed
Parameters (in)
Transition
Transition value to request new CAN controller state
Parameters (inout)
None
Parameters (out)
None
Return value
Std_ReturnType
E_OK: request accepted
E_NOT_OK: request not accepted, a development error occurred
Description
This function performs software triggered state transitions of the CAN controller State machine.
Available via
Can.h
⌋
[SWS_Can_00017]
Upstream requirements: SRS_SPAL_12169, SRS_Can_01053
⌈The function Can_SetControllerMode shall perform software triggered state transitions of the CAN controller State machine. See also [SRS_SPAL_12169]⌋
[SWS_Can_00384] ⌈Each time the CAN controller state machine is triggered with the
state transition value CAN_CS_STARTED, the function Can_SetControllerMode
shall re-initialize the CAN controller with the same controller configuration set previously used by functions Can_SetBaudrate or Can_Init.⌋
Refer to [SWS_Can_00048] for the case of a wakeup event from CAN bus occurred
during sleep transition.
[SWS_Can_00294] ⌈The function Can_SetControllerMode shall disable the wake-up interrupt, while checking the wake-up status.⌋
[SWS_Can_00196] ⌈The function Can_SetControllerMode shall enable interrupts
that are needed in the new state.⌋
[SWS_Can_00425] ⌈Enabling of CAN interrupts shall not be executed, when CAN
interrupts have been disabled by function Can_DisableControllerInterrupts.⌋
[SWS_Can_00197] ⌈The function Can_SetControllerMode shall disable interrupts
that are not allowed in the new state.⌋
[SWS_Can_00426] ⌈Disabling of CAN interrupts shall not be executed, when CAN
interrupts have been disabled by function Can_DisableControllerInterrupts.⌋
[SWS_Can_00198] ⌈If development error detection for the Can module is enabled: if
the module is not yet initialized, the function Can_SetControllerMode shall raise
development error CAN_E_UNINIT and return E_NOT_OK.⌋
[SWS_Can_00199] ⌈If development error detection for the Can module is enabled: if
the parameter
is out of range, the function Can_SetControllerMode shall raise
development error CAN_E_PARAM_CONTROLLER and return E_NOT_OK.⌋
[SWS_Can_00200] ⌈If development error detection for the Can module is enabled:
if an invalid transition has been requested, the function Can_SetControllerMode
shall raise the error CAN_E_TRANSITION and return E_NOT_OK.⌋
[SWS_Can_00603] ⌈If selective wakeup is supported by hardware and the requested
mode is CAN_CS_STARTED,CAN controller shall call the API CanIf_ConfirmCtrlPnAvailability() for the corresponding abstract CanIf ControllerId. CanIf_
ConfirmCtrlPnAvailability informs CanNm (through CanIf and CanSm) that
selective wakeup is enabled.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CANDriver.pdf |
|---|---|
| Dokumentseite | Seite 59 |
| Ziel-Modul | can (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |