SNIP_CLASSIC_CAN_SECTION_9_8_Receive_indication_polling_mode
Wortlaut
9.8 Receive indication (polling mode)
«module» LSduR BSW Scheduler
«Peripheral» CanController
«module» Can
«module» CanIf loop Cyclic Task of Interface alt Pending Rx indication [Rx indication pending] [No Rx indication pending] alt Temporary buffer usage [Temp. buffer used = Data normalization necessary] [Temp. buffer not used = Data normalization not necessary] alt Temporary buffer usage [Temp. buffer used = Data normalization necessary] [Temp. buffer not used = Data normalization not necessary]
LSduR_CanIfRxIndication(PduIdType, const PduInfoType*) Invalidation of hardware object() Software filtering (optional) and L-PDU assignment Copy received L-PDU into temporary buffer() CanIf_RxIndication(const Can_HwType*, const PduInfoType*) [CAN L-PDU ID was found]: Data Length Check (optional) Validation of hardware object()
Can_MainFunction_Read()
Can_MainFunction_Read() Copy data() Check for pending Rx indication()
LSduR_CanIfRxIndication() Copy data() CanIf_RxIndication() Figure 9.8: Receive indication polling driven Activity Description Cyclic Task CanDrv The service Can_MainFunction_Read() is called by the BSW Scheduler. Check for new received L-PDU Can_MainFunction_Read() checks the underlying CAN Controller(s) about new received L-PDUs. Invalidation of CAN hardware object, provide CPU access to CAN mailbox In case of a new receive event the CPU (CanDrv) get exclusive access rights to the CAN mailbox or at least to the corresponding hardware object, where new data were received. Buffering, normalizing In case of a new receive event the L-PDU is normalized and is buffered in the temporary buffer located in CanDrv. Each CanDrv owns such a temporary buffer for every Physical Channel only if normalizing of the data is necessary. Indication to CanIf The reception is indicated to CanIf by calling of CanIf_ RxIndication(). The HRH specifies the CAN RAM Hardware Object and the corresponding CAN Controller, which contains the received L-PDU. The temporary buffer is referenced to CanIf by PduInfoPtr->SduDataPtr. Software Filtering The Software Filtering checks, whether the received L-PDU will be processed on a local ECU. If not, the received L-PDU is not indicated to upper layers. Further processing is suppressed. Data Length Check If the L-PDU is found, the Data Length of the received L-PDU is compared with the expected, statically configured one for the received L-PDU. Receive Indication to the upper layer If configured, the corresponding receive indication service of the upper layer is called. This signals a successful reception to the target upper layer. The parameter RxPduId specifies the L-SDU, the second parameter is the reference on the temporary buffer within the L-SDU. During is execution of this service the CAN hardware buffers must be unlocked for CPU access/locked for CAN Controller access. Validation of CAN hardware object, allow access of CAN Controller to CAN mailbox The CAN Controller get back exclusive access rights to the CAN mailbox or at least to the corresponding hardware object, where new data were already being copied into the upper layer buffer.
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Can_MainFunction_Read calls CanIf_RxIndication
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CANInterface.pdf |
|---|---|
| Dokumentseite | Seite 153 |
| Ziel-Modul | can (classic) |
| Ziel-Anforderung | SWS_Can_00396 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.90 |