当前位置:网站首页>[AUTOSAR com 2. Advanced introduction to communication protocol stack]
[AUTOSAR com 2. Advanced introduction to communication protocol stack]
2022-07-23 12:35:00 【Rest of life】
First of all, understand Autosar Communication stack diagram 
AUTOSAR The communication stack in contains the following parts :
One .can
We are looking at and Autosar Can Model 
·CAN drive
CAN The driver provides a unified interface for upper users ——CAN Interface .CAN The driver hides the correlation as reasonably as possible CAN Hardware specificity of the controller .
CAN Driver is the bottom part , Perform hardware access for the upper layer and provide hardware independent API. The only one in the upper layer can access CAN Driven by CAN Interface .
If a few CAN The controller belongs to the same CAN Hardware unit , Then they can be made by CAN Drive to control .
One CAN The controller is always associated with a physical channel . It is allowed to connect with the physical channel on the bus , No matter CAN Whether the interface will be relevant CAN Controllers are treated separately .
·CAN Interface ( Hardware abstraction )
CAN Interfaces provide standardized interfaces , adopt ECU Of CAN Bus system to support communication . Its API And dedicated CAN Controller and its pass CAN The access of the driver layer is irrelevant .CAN Interfaces can access one or more through a unified interface CAN drive .
CAN The interface can only be used for CAN signal communication , And it is to operate one or more underlying CAN Driven and specially designed . Covering different CAN Several hardware units CAN The drive module consists of a driver in CAN Drive the general interface specified in the specification to represent .CAN outside ( That is to say LIN) Other protocols of do not support .
·CAN Transport layer
CAN The transport layer is located at PDU Routing and CAN Modules between interface modules . Its main function is to split and merge more than 8 Bytes of CAN I-PDU.
according to AUTOSAR Basic software architecture ,CAN The services provided by the transport layer include :
n Data segmentation in sending direction ;
n Data merging in the receiving direction ;
n Data flow control ;
n Error detection during segmentation .
AUTOSAR The architecture defines each specific transport layer of the communication system (CanTp、 contain LinIf Of LinTp、FlexRayTp). therefore ,CAN The transport layer only covers CAN Details of the transmission protocol .
CAN The transport layer has an interface , This interface connects a separate lower layer CAN Interface layer and a separate upper layer PDU Router modular .
according to AUTOSAR Released plan , The CAN The transport layer specification contains the following limitations :
CAN The transport layer only operates in event triggered mode ,
No transmission / Receive undo .
·CAN Transceiver drive ( and NM Strong correlation )
CAN The transceiver driver is responsible for processing ECU Upper CAN Transceiver , Based on the whole ECU Bus specific to the current state NM The state of .
CAN The target driven by transceiver :CAN Transceiver driver Abstract use CAN Transceiver hardware chip . It provides hardware independent interfaces to higher layers . It can also pass through MCAL Layer of API from ECU Abstracted from the design , visit CAN Transceiver hardware .
CAN The hardware of the transceiver must provide functions and interfaces , To map to AUTOSAR CAN On the operation mode model driven by transceiver .
Lower drive (SPI and DIO) The use of API Must synchronize . The implementation of lower drivers that do not support synchronous behavior cannot be compared with CAN Used with transceiver driver .
Two COM
AUTOSAR COM This layer is located in RTE and PDU Between routers . It comes from OSEK_COM standard .AUTOSAR COM It provides the function of signal gateway .
COM The dependencies with other modules are shown in the following figure :

·COM Manager
COM Manager(COM management ) It's basic software Basic Software(BSW) A component of . It is a resource management that includes the control of lower level communication services .
COM Manager Basic software module of control (BSW) Communication related , Not related to software components or runnable entities .
COM Manager Collect bus communication access requests from the communication requester , And coordinate bus communication access requests .
COM Manager The goal is :
(1) Simplify the use of bus communication stack for users . This includes initialization of bus communication stack and simplified network management processing .
(2) Coordinate with multiple software components ( In a ECU On ) Irrelevant bus communication stack ( Allow the transmission and reception of signals ) The usability of .
(3) Temporarily cancel the signal transmission to prevent ECU Wake up communication bus .
(4) control ECU More than one communication bus channel , This is achieved by implementing a state mechanism for each channel .
(5) To provide for ECU Keep the bus in “ Silent communication ” Pattern .
(6) Simplify resource management by allocating all resources necessary for the request communication pattern .
COM Manager It contains the following basic functions :

·AUTOSAR COM And OSEK COM Comparison
According to the functions provided by the communication part , Compare the two in the same function API, And their unique API, because AUTOSAR COM in comparison with OSEK COM, There is one more COM Manager, Communication management module , So the whole thing AUTOSAR COM Manager by AUTOSAR Unique to the standard , Next, the same functional parts of the two are compared .
1、 Same functions and services
(1) Start and control services 
The comparison between the two in the start-up and control service part of communication can be seen : First ,AUTOSAR Provided API More , It shows that its function is strong ; secondly ,AUTOSAR The startup and control service of includes I-PDU( Interaction layer protocol data unit ) Processing and control of , Such as Com_IpduGroupStart、Com_IpduGroupStop.
(2) Communication services

By contrast, we can see ,OSEK The communication service includes some simple handling of errors , Such as getting the wrong service Id(COMErrorGetServiceId), and AUTOSAR The communication service still includes a pair of I-PDU To deal with , Such as Com_TriggerIPDUSend.
(3) Notification mechanism support services (OSEK) And callback notification service (AUTOSAR)
2、 Different functions and services
(1)OSEK by I-PDU The processing of provides a special kind of service , be called OSEK Indirect network management interface , contain 2 individual API:I-PDU Transmission instructions (I_MessageTransfer) and I-PDU Timeout indication (I_MessageTimeOut).
(2)OSEK The communication part provides some routines to expand the communication , contain 3 individual API:StartCOMExtension、COMCallouts、COMErrorHook.
(3)AUTOSAR Some scheduling functions are provided , It mainly routes the receiving or sending of messages or signals 、 The role of scheduling , contain 3 individual API:Com_MainFunctionRx、Com_MainFunctionTx、Com_MainFunctionRouteSignals.
(4)AUTOSAR The communication part of has a COM Manager, This is a communication management module , yes AUTOSAR Standard specific , Mainly responsible for monitoring communication 、 management 、 Diagnose and manage communication related ECU state . The following table lists the parts it provides API.

summary : AUTOSAR COM And OSEK COM The difference is comM
comM The role of :1. For communication mode , Manage communication resources 2. Simplify the use of bus communication stack for users , Including initialization of bus communication and simplified network processing
边栏推荐
- 二叉树的实现-c
- Data mining scenario - false invoice
- Embedded from entry to mastery (buried) - sharing of ultra detailed knowledge points 3
- 【AUTOSAR CanDrive 1.学习CanDrive的功能和结构】
- 单片机学习笔记6--中断系统(基于百问网STM32F103系列教程)
- 高电压技术复习资料
- 常见的排序—交换排序
- ARM架构与编程3--按键控制LED(基于百问网ARM架构与编程教程视频)
- Tencent cloud client command line tool tccli main process analysis
- 时间序列的数据分析(二):数据趋势的计算
猜你喜欢
随机推荐
【AUTOSAR CanDrive 2.了解通信Hoh、CanId与PduID的Mapping关系】
【分清楚常量指针与指针常量 Const int *与Int * Const的含义与用法】
C language small project - student achievement management system
编码器的一点理解
Upper and lower case letter conversion
钢结构复习题
博客搭建三:评论系统选择
Baidu Shen Shuo: focus on the scene, deeply cultivate the industry, and bring practical results to enterprise Digitalization
大小写字母转换
【Autosar 存储Stack NVM】
Embedded from entry to mastery (buried) - sharing of ultra detailed knowledge points 1
Object class
Analysis of 100 questions and answers in Higher Algebra
时间序列的数据分析(一):主要成分
obs插件基础
Matplotlib Usage Summary
单片机学习笔记6--中断系统(基于百问网STM32F103系列教程)
博客搭建四:将自己的博客加入百度和谷歌收录的方法
Talent column | can't use Apache dolphin scheduler? The most complete introductory tutorial written by the boss in a month
单片机学习笔记3--单片机结构和最小系统(基于百问网STM32F103系列教程)









