Autosar Com Stack
Upendra Kumar
Automotive Software Engineer|Autosar|BSW|RTE|SWC|Memory Stack|Com Stack|CddSbc|Stepper Motor Driver|Bare-Metal Diriver|Integration MATLAB|Simulink|State flow|Embedded C
1. SWC (Software Component)
?The SWC is an application-level module that generates or receives data, which needs to be transmitted or received via CAN.
?Data is transmitted via RTE (Runtime Environment). The RTE connects the SWC to the lower layers of the communication stack.
2. Com (Communication Services)
?The Com module handles the data exchange between the SWC and the lower layers. It packs and unpacks signals (the data units) into or from PDUs (Protocol Data Units).
?Data transmission:
?It takes signals from the SWC, bundles them into a PDU, and passes them down to the PduR (PDU Router).
?Data reception:
?When receiving data, the Com module unpacks the received PDUs into individual signals and forwards them to the SWC via RTE.
3. PduR (PDU Router)
?PduR is responsible for routing the PDUs between communication modules.
?It decides where to send the PDU based on the configuration, whether it should go to the CAN Interface (CanIf) or some other communication protocol.
?Data transmission:
?PduR receives the PDU from the Com module and routes it to the CanIf for transmission over CAN.
?Data reception:
领英推荐
?On reception, PduR receives the PDU from CanIf and routes it to the Com module.
4. CanIf (CAN Interface)
?The CanIf is an abstraction layer between the upper layers (Com, PduR) and the hardware-specific CAN Driver.
?Data transmission:
?It receives the PDU from the PduR, applies any necessary changes (e.g., DLC checking), and passes it down to the CAN Driver.
?Data reception:
?When the CanIf receives a message from the CAN Driver, it forwards it up to the PduR.
5. CAN Driver
?The CAN Driver is responsible for controlling the hardware (CAN controller). It manages the transmission and reception of CAN frames on the CAN bus.
?Data transmission:
?It sends the CAN frame (containing the PDU) onto the CAN bus.
?Data reception:
?When a CAN frame is received from the CAN bus, it passes the frame to the CanIf for further processing.