DEENESPTFRRUARHIKOZHNL
CLASSIC Modul: ecum Rolle: constitutive Konfidenz: 95%

SNIP_CLASSIC_ECUM_SECTION_8_3_7_FrTrcv_CheckWakeupByTransceiver

Quelle: SWS_FlexRayTransceiverDriver.pdf (Seite 46) • Ziel-Anforderung: SWS_FrTrcv_00380

Wortlaut

8.3.7 FrTrcv_CheckWakeupByTransceiver [SWS_FrTrcv_00331] Definition of callback function FrTrcv_CheckWakeupBy Transceiver ⌈ Service Name FrTrcv_CheckWakeupByTransceiver Syntax void FrTrcv_CheckWakeupByTransceiver ( uint8 FrTrcv_TrcvIdx ) Service ID [hex] 0x0e Sync/Async Synchronous Reentrancy Reentrant Parameters (in) FrTrcv_TrcvIdx This zero based index identifies the transceiver within the context of the transceiver driver to which the API call has to be applied Parameters (inout) None Parameters (out) None Return value None Description -- Available via FrTrcv.h ⌋ [SWS_FrTrcv_00364] ⌈The driver shall notify ECU State Manager of wakeup events if triggered by the API call FrTrcv_CheckWakeupByTransceiver.⌋ [SWS_FrTrcv_00233] Notification for Wake-up by Bus Upstream requirements: SRS_Fr_05147 ⌈The FlexRay Transceiver Driver shall support a notification to inform higher layers about the wake-up by bus. It must be possible to support more than one bus within the ECU with this notification. The FlexRay Transceiver Driver shall call this notification when the transceiver detects a wake-up by bus. The FlexRay Transceiver Driver is notified by a notification from the underlying SPI or DIO driver in that case. The notification is executed in the context of the caller (may be interrupt context!). Because the delay from wake-up detection until the start of the necessary actions has a large influence on the startup time of an ECU, this event shall be processed internally and transferred immediately via this notification to the next layer. The call context and the reaction time depend on the call context of the lower layer DIO or SPI. In case of interrupt it is very fast but data consistency issues must be covered in all layers. In case of polling data consistency issues are reduced but reaction time may be too slow. Rationale: Support wake-up by FlexRay Transceiver devices. Use Case: The FlexRay Transceiver detects a wake-up condition on the bus and shows this to the µC via e.g. a port pin. Further handling depends on current ECU state. Assuming the ECU is halted, the change on the port may terminate the "HALT" statement and let the processor continue its work. The assigned port interrupt will be executed and this handler is called. Now, the FlexRay Transceiver Driver will store the wake-up reason and give the call via this notification to e.g. the NM to let the NM decide how to handle the event.⌋ [SWS_FrTrcv_00262] ⌈EcuM2483: The driver has to notify ECU State Manager by invoking the EcuM_SetWakeupEvent service once when a wakeup event is detected. The same service should also be invoked during initialization of the driver if a pending wakeup event is detected during the initialization. Preferably, the invocation is done from a callout or function stub of the caller, to decouple driver modules and ECU State Manager.⌋ [SWS_FrTrcv_00311] ⌈The function FrTrcv_CheckWakeupByTransceiver() shall call the API service EcuM_SetWakeupEvent with the parameter value ECUM_WKSOURCE_FRTRCV_FR of EcuM_WakeupSourceType only in case a valid wakeup originated from the transceiver identified by FrTrcv_TrcvIdx. Thus, shared interrupts are easily de-multiplexed: Drivers just return doing nothing if they did not trigger the interrupt.⌋ [SWS_FrTrcv_00374] ⌈The function FrTrcv_CheckWakeupByTransceiver() shall clear a pending wake up event on the transceiver identified by FrTrcv_TrcvIdx after the last call of EcuM (EcuM_SetWakeupEvent). Wake up by bus is always asynchronous to the transition to sleep and standby. In worst case wake up occurs during transition to sleep.⌋ [SWS_FrTrcv_00375] ⌈The FlexRay Transceiver Driver shall check for wake up events immediately after the API call FrTrcv_SetTransceiverMode if supported by hardware.⌋ [SWS_FrTrcv_00378] ⌈If no wake up by bus is used this function need not be present in compiled code. See configuration parameters FrTrcvWakeupByBusUsed [ECUC_FrTrcv_00350] for more details.⌋ [SWS_FrTrcv_00379] ⌈Calling FrTrcv_CheckWakeupByTransceiver in an interrupt context shall be supported. Hint: This has to be documented according to [SRS_ BSW_00333]). Hint: While the ECU is in SLEEP, the main function () is not scheduled yet, but the wake up reason has to be identified by the FlexRay Transceiver Driver in the context of the wake up interrupt.⌋ [SWS_FrTrcv_00380] ⌈Calling FrTrcv_CheckWakeupByTransceiver by a polling process in sleep mode shall be supported.⌋ [SWS_FrTrcv_00312] ⌈If development error detection of module FrTrcv is enabled: if the parameter FrTrcv_TrcvIdx is out of range, the function FrTrcv_CheckWakeupByTransceiver shall raise development error FRTRCV_E_FR_INVALID_TRCVIDX.⌋ [SWS_FrTrcv_00313] ⌈If development error detection of module FrTrcv is enabled: if the FrTrcv module is not initialized, the function FrTrcv_CheckWakeupByTransceiver shall raise development error FRTRCV_E_UNINIT.⌋ [SWS_FrTrcv_00229] Configuration "Notification for Wake-up by Bus" Upstream requirements: SRS_Fr_05136 ⌈The FlexRay Transceiver Driver shall support the compile time configuration of one notification to a higher layer for change notification for "wake-up by bus" events. One wake-up by bus event notification shall be supported to one higher layer. If a transceiver device does not support "wake-up by bus", this notification is never called for this bus. Efficient coupling between FlexRay Transceiver Driver and higher layer.⌋ [SWS_FrTrcv_00234] Support for Wake-up During Sleep Transition Upstream requirements: SRS_Fr_05148 ⌈The FlexRay Transceiver Driver shall support situations where a wake-up by bus occurs at the same moment the transition to standby/sleep is executed by the driver. Wake-up by bus is always asynchronous to the internal transition to sleep. In worst case, the wake-up occurs during the transition to sleep. This situation must be covered by the design and explicitly tested for each ECU. The driver shall create a wake-up notification by bus immediately after the API to enter the standby/sleep mode has finished. The calling/controlling component (NM or ECU state manager) must be capable to handle the wake-up immediately after requesting the standby/sleep. Safe wake-up and sleep handling. All busses with a wake-up by bus are affected.⌋

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_FlexRayTransceiverDriver.pdf
Dokumentseite Seite 46
Ziel-Modul ecum (classic)
Ziel-Anforderung SWS_FrTrcv_00380
Semantische Rolle constitutive
Automatisierungs-Konfidenz 0.95