Introduction to BUS Interface layer in AUTOSAR architecture
In the AUTOSAR architecture, as we have main layers such as BSW, RTE and Application Layers. To make the software modules more abstract oriented from the hardware, AUTOSAR has divided the BSW into further sub layers.
BSW Sublayers:
- MCAL
- ECU Abstraction Later
- Service Layer
BUS Interface (BUS IF) modules come under ECU abstraction layer. In this article we will discuss about CANIf module as we will be focusing more on CAN bus and CAN network.
What is the purpose of CANIf module?
In the ECU hardware, we can have multiple CAN hardware devices like CAN controllers and CAN Transceivers. These hardware devices can be on chip devices as well as external devices. Depending on the system requirements from OEM, the complexity of the CAN network can be increased. This will increase the development time when ever there is change in the hardware.
To reduce the development time, AUTOSAR has created an ECU abstraction layer which contains the BUS Interface modules like CANIf to eliminate the hardware dependency for the software modules to transmit and receive the data.
But how CANIf will eliminate the hardware dependency? Let’s talk about it.
How CANIf will remove hardware dependency to the upper layer modules?
When the data to be transmitted from the upper layer modules, they need to pass the data to protocol drivers, which will have the dedicated buffers and handles to handle the data communication. Let’s dive a little deeper to understand how CAN driver works to handle the data communication.
Hardware Object Handles (HOH) represent an abstract reference to a CAN mailbox structure that contains CAN related parameters such as Can ID, DLC and data. Data will be sent/received through these mail boxes mapped to the HOHs. These HOHs are configured in CAN driver module in Micro Controller Abstraction Layer (MCAL).
CANIf module will refer these Hardware Object Handles (HOH) without worrying about the CAN handle type, buffers, buffer addresses, CAN message IDs, DLC. Lower layer modules will have these configurations which directly deal with hardware devices like CAN controller and CAN Transceiver.
Basically, the upper layer modules (ex: COM) will pass the data via I-PDUs to CANIf module. In CANIf module, PDUs will only refer to the HOHs which are configured in the lower layer modules. Since CANIf is just referring to the HOHs, and not directly depending on the driver level details like which CAN controller to be used, which CAN ID to be used and DLC and other low level details, the upper layer modules also will not have dependency on the hardware devices.
Do you want to know more about what is Hardware Object Handle and CAN MailBox?? Read more
Discover more from
Subscribe to get the latest posts sent to your email.