In AUTOSAR, CAN Interface (CanIf) distinguishes between BasicCAN and FullCAN handling to activate software acceptance filtering. A CAN mailbox (Hardware Object) for FullCAN operation only allows the transmission or reception of a single CanId. On the other hand, in BasicCAN controller, it maps a range of Tx or Rx Can Message Ids to a single Hardware Object handle.
In Basic CAN controller, a Hardware Receive Object(HRH) can receive a range of Can Ids that pass its hardware acceptance filter. This range may exceed the list of predefined Rx L-PDUs (Receive Logical Protocol Data Units) that this HRH (Hardware Receive Handler) is meant to receive. Therefore, CanIf subsequently executes software filtering to pass only the predefined list of Rx L-PDUs to the corresponding upper layer modules. Read detailed post on “Software Receive Filter” here.
Full CAN Controller in AUTOSAR:
In AUTOSAR, a Full CAN controller is a specialized type of controller that supports the FULL CAN programming model. This model assigns a single Inter-ECU Protocol Data Unit (IPDU) to a single CAN frame. In Full CAN controller, each CAN message maps to one Hardware Object Handle (HOH), and CAN hardware registers handle the message filtering process. As the mapping is “one message to one HOH to one PDU”, it eliminates the need for software filtering and decrease the load on CAN task. This streamlined approach facilitates direct and efficient communication between Electronic Control Units (ECUs) within a system. In AUTOSAR, the Full CAN controller equips itself with the necessary hardware and software components to implement the CAN protocol and establish interfaces for seamless communication with other ECUs.
The implementation of the Full CAN feature serves to prevent overload in the upper layers of the system, ensuring optimal performance and reliability.
Basic CAN Controller in AUTOSAR:
Within the AUTOSAR framework, the Basic CAN controller stands as a pivotal component that supports the Basic CAN programming model. This model combines multiple Inter-ECU Protocol Data Units (IPDUs) into a single CAN frame. It requires software filtering to decide which PDUs to forward to upper layer module during reception. The Basic CAN controller in AUTOSAR includes both essential hardware and software components needed for effective CAN protocol execution. It also has the capability to add headers to PDUs and combine them into a single frame. Additionally, it provides interfaces for seamless communication with other Electronic Control Units (ECUs). While providing the flexibility and scalability in ECU communication, the Basic CAN controller introduces complexity in the software architecture.
The Communication module groups IPDUs, which are then sent to the CAN Interface (IF) module for further processing. The CanIf module is responsible for adding necessary header information, as specified in the arxml file or dbc file. If IPDU size is limited to 24 bits, additional space can be allocated within the CAN frame. Subsequently, the CAN IF module can combine multiple IPDUs from the Communication Module into a single CAN frame for transmission. This process is commonly referred to as Basic CAN.
How to select Full CAN and Basic CAN Controller for Your AUTOSAR Project:
The decision to use a Full CAN controller or a Basic CAN controller depends on the specific application requirements. If an application requires only a limited number of distinct messages, a Full CAN controller with multiple message object buffers may be more efficient. On the other hand, if the application needs to process all messages within the system, a Basic CAN controller with a receive queue may be more appropriate.
Some modern CPUs can integrate two CAN controllers that share the same RX/TX pins. This capability offers expanded options for system design.
Utilizing Full CAN and Basic CAN controllers effectively in your project is crucial for achieving optimal performance. The CAN protocol has a maximum speed of 1 Mbit/s, with interruptions occurring approximately every 55 microseconds on average. However, the actual interruption rate may vary depending on system load factors. These factors have interrupt latencies and different priorities that can impact CAN Bus reception. It is important to consider these factors when implementing Full CAN and Basic CAN controllers in order to ensure efficient and reliable operation in your project.
Discover more from
Subscribe to get the latest posts sent to your email.