AUTOSAR CANIF
The CAN Interface module provides a unique interface to manage different CAN hardware device types like CAN controllers and CAN transceivers used by the defined ECU hardware layout. Thus multiple internal and external CAN controllers/CAN transceivers can be controlled by the CAN State Manager module.
CANIF is responsible for the below functions
- Transmit request services: The CANIF’s transmit request function CanIf_Transmit() is a common interface for upper layers to transmit PDUs on the CAN network. The upper communication layer modules initiate the transmission only via the CAN Interface module's services without direct access to the CANDrv.
- Transmit confirmation services: If a previous transmit request is completed successfully, the CANDrv notifies it to the CanIf by the call of CanIf_TxConfirmation(). When callback notification CanIf_TxConfirmation() is called, the CANIF shall identify the upper layer communication layer , which is linked to the successfully transmitted L-PDU, and shall notify it about the performed transmission by call of CANIF's transmit confirmation service User_TxConfirmation()
- Reception indication services: This service indicates a successful reception of an L-PDU to the upper layer module after passing all filters and validation checks
- Controller mode control services: The CAN controller status may be changed at request of the upper layer by the calling of CanIf_SetControllerMode() service. The request is validated and passed by the CanIf via the CanDrv API to the addressed CAN controller
- PDU mode control services: CanIf_SetPduMode() service sets the requested mode at the L-PDUs of a predefined logical PDU channel.
Handling of CAN Hardware:
The CAN hardware unit combines one or multiple CAN controller modules of the same type, which may be located on-chip or as external standalone devices. Each CAN hardware unit is served by the corresponding CAN Driver module. If different types of CAN controllers are used, also different types of CAN Driver modules have to be applied with a unified API to the CAN Interface module. The CAN Interface module collects information about number and types of CAN controller modules and their hardware objects in its mapping tables at configuration time. This allows transparent and hardware independent access to upper layer modules using HOHs.
Handling Basic and Full CAN:
CanIf distinguishes between BasicCAN and FullCAN handling for activation of software acceptance filtering. A CAN Hardware Object for FullCAN operation only enables transmission or reception of single CanIds. A CAN Hardware Object for BasicCAN operation of one Hardware Object enables to transmit or receive a range of CanIds. BasicCAN and FullCAN objects can coexist in a single configuration setup.
Thanks for such a beautiful blog on Canif module,i hope we will be seeing more blogs on the Autosar BSW modules and keep continuing :)
ReplyDelete