SNIP_CLASSIC_CAN_SECTION_8_3_2_8_Can_GetControllerRxErrorCounter
Wortlaut
8.3.2.8 Can_GetControllerRxErrorCounter
[SWS_Can_00511] Definition of API function Can_GetControllerRxErrorCounter
⌈
Service Name
Can_GetControllerRxErrorCounter
Syntax
Std_ReturnType Can_GetControllerRxErrorCounter (
uint8 ControllerId,
uint8* RxErrorCounterPtr
)
Service ID [hex]
0x30
Sync/Async
Synchronous
Reentrancy
Non Reentrant for the same ControllerId
Parameters (in)
ControllerId
CAN controller, whose current Rx error counter shall be acquired.
Parameters (inout)
None
Parameters (out)
RxErrorCounterPtr
Pointer to a memory location, where the current Rx error counter
of the CAN controller will be stored.
Return value
Std_ReturnType
E_OK: Rx error counter available.
E_NOT_OK: Wrong ControllerId, or Rx error counter not available.
Description
Returns the Rx error counter for a CAN controller. This value might not be available for all CAN
controllers, in which case E_NOT_OK would be returned.
Please note that the value of the counter might not be correct at the moment the API returns it,
because the Rx counter is handled asynchronously in hardware. Applications should not trust
this value for any assumption about the current bus state.
Available via
Can.h
⌋
[SWS_Can_00512]
Upstream requirements: SRS_BSW_00406
⌈If development error detection for the Can module is enabled: if the module is not
yet initialized, the function Can_GetControllerRxErrorCounter shall raise development
error CAN_E_UNINIT and return E_NOT_OK.⌋
[SWS_Can_00513]
Upstream requirements: SRS_BSW_00323
⌈If development error detection for the Can module is enabled: if the parameter ControllerId is out of range, the function Can_GetControllerRxErrorCounter shall raise development error CAN_E_PARAM_CONTROLLER and return E_NOT_OK.⌋
[SWS_Can_00514]
Upstream requirements: SRS_BSW_00323
⌈If development error detection for the Can module is enabled: if the parameter RxErrorCounterPtr is a null pointer, the function Can_GetControllerRxErrorCounter shall
raise development error CAN_E_PARAM_POINTER and return E_NOT_OK.⌋
[SWS_Can_00515]
Upstream requirements: SRS_Can_01170
⌈When the API Can_GetControllerRxErrorCounter is called with Controller Id as input
parameter then Can driver shall read the Rx error counter register of Can Controller
and shall return the Rx error count to upper layer.⌋
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 66 |
| Ziel-Modul | can (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |