当前位置:网站首页>[AUTOSAR com 1. introduction to communication protocol stack]
[AUTOSAR com 1. introduction to communication protocol stack]
2022-07-23 12:27:00 【Rest of life】
CP AUTOSAR Download link to the document
1、 First let's look at COM stack Architecture diagram 
1 CAN Communication protocol stack concept
AUTOSAR The communication stack is located in the runtime environment (RTE) And microcontroller abstraction layer (MCAL) Between , It can simplify ECU Communication services between , Realize data interaction between different types or rate buses . stay AUTOSAR In the communication stack , The communication module is located in the service layer (Communication,Com), Diagnose the communication management module (Diagnositic Communication Manager,Dem)、 Protocol data unit routing module (Protocol Data Unit Router,PduR), Protocol data unit multiplexing module (I-PDU Multiplexer,IpduM)、 Bus related transmission module ( Such as CanTp,FrTp etc. ) And communication and network management related modules ; be located ECU The abstract layer is the interface module related to the bus ( Such as CanIf,LinIf etc. ); Located in the microcontroller abstraction layer is the bus related driver module ( Such as Can,Lin etc. )
AUTOSAR The communication stack hides the attributes of bus related protocols and messages from the application layer . In basic CAN For example, communication , The sending mechanism is **RTE–>COM–>PduR–>CanIf–>CAN Driver,** The process is described as follows :
Com The module obtains the signal of the application layer (Signal), After certain treatment, it is packaged as I-PDU(Interaction Layer Protocol Data Unit) Send to PduR modular ;
PduR Specified in the module Routing Protocol I-PDU Target receiving module , Will receive I-PDU After certain processing, send it to CanIf;
CanIf Put the signal in L-PDU(Data Link Layer Protocol Data Unit) In the form of CAN Driver module
2 CAN Introduction to communication protocol module
2.1 Com modular
Com The module is located in the runtime environment RTE And PduR Between modules , Its main functions include :
Load the signal into I-PDU Sent in , Received from I-PDU The signal is parsed from the ;
Provide signal routing function , Will receive I-PDU The signals in are packaged to transmit I-PDU in ;
Communication transmission control ( start-up / stop it I-PDU Group )
Send a response to a request, etc .
For each Com I-PDU Need to set I-PDU Transmission direction of (ComIPduDirection)、 Signal processing mode (ComIPduSignalProcessing)、 type (ComIPduSignalRef)、 Of I-PDU Working group (ComIPduGroupRef)、Com Signal reference (ComIPduSignalRef)、 overall situation PDU quote (ComPduIdRef) etc. .
2.2 PduR modular
PduR The module is mainly a communication interface module 、 Transport protocol module 、 The diagnosis communication management module and the communication module provide information based on I-PDU Routing services for . It plays a connecting role in the communication protocol stack , It shields the network details for the upper service basic software modules and applications , Make the upper basic software modules and applications do not care about running on that kind of bus network . meanwhile ,PduR The module provides based on I-PDU The gateway function of , It makes communication between different buses possible .
2.3 CanIf modular
CAN The interface layer (CanIf) Is access CAN Standard interface of bus .CanIf Abstract the CAN Location information of the controller , And provide a unified interface to the upper module , Shield the difference of the lower layer , That is, the upper level doesn't care CAN Is the controller an on-chip device of a microcontroller or an off chip device .
CANIf Main functions of the module : Finish right CanIf And initialization of global variables and configuration buffers in the controller ; Send request service , Provide upper application in CAN Send... Over the network PDU The interface of ; Send confirmation service , Notify the upper layer after sending successfully , Or send the cancellation confirmation and save it in the send cache ; Receive instruction services , Successfully received PDU And then notify the upper layer .
CANIf The module is mainly configured as a hardware object handle (Hardware object handle,Hoh), Include Hth(Hardware transmit handle) and Hrh(Hardware receive handle), They need references Can Module CAN Hardware objects .
2.4 ComM modular
Communication management module (Communication Manager,ComM) It can simplify the initialization of bus communication stack 、 Network management, etc , And can collect / Coordinate bus communication access requests . It mainly provides three communication modes :
COMM_FULL_COMMUNICATION:FULL Communication mode , This status can be received and sent
COMM_SILENT_COMMUNICATION:SILENT Communication mode , This status can only be received
COMM_NO_COMMUNICATION:NO Communication mode , Communication is not possible in this state
2.5 CanSM modular
CAN State Manager (CAN State Manager,CanSM) Responsible for implementation CAN Abstraction of network control process , It's for ComM Module supply API To request CAN The network switches the communication mode .
3 MCal And Can modular [2]
CAN drive (CAN Driver) It belongs to the communication driver in the microcontroller abstraction layer , It is aimed at the internal of microcontroller CAN controller , Can realize the right CAN Initialization of the controller 、 send out / receive CAN message 、 Indication of receiving message and confirmation of sending message 、 Wake up detection 、 Functions such as overflow and error handling .CAN Drivers can access hardware , And provide independent hardware to the upper layer API.
边栏推荐
- Tencent cloud client command line tool tccli main process analysis
- 论文解读:《提高N7-甲基鸟苷(m7G)位点预测性能的迭代特征表示方法》
- 单片机学习笔记4--GPIO(基于百问网STM32F103系列教程)
- 鋼結構基本原理複習
- ARM架构与编程6--重定位(基于百问网ARM架构与编程教程视频)
- 论文解读:《开发和验证深度学习系统对黄斑裂孔的病因进行分类并预测解剖结果》
- Interpretation of the paper: "i4mc deep: intelligent prediction of N4 methylcytosine sites using deep learning methods with chemical properties"
- NLP自然语言处理-机器学习和自然语言处理介绍(一)
- 高电压技术考题附答案
- Summary of problems encountered during app audit
猜你喜欢

ARM架构与编程3--按键控制LED(基于百问网ARM架构与编程教程视频)

2021信息科学Top10发展态势。深度学习?卷积神经网络?

Data analysis (II)

钢结构基本原理题库

高等代数知识结构

单片机学习笔记4--GPIO(基于百问网STM32F103系列教程)

Baidu Shen Shuo: focus on the scene, deeply cultivate the industry, and bring practical results to enterprise Digitalization

钢结构复习题

Interpretation of the paper: iterative feature representation method to improve the prediction performance of N7 methylguanosine (m7G) sites

How to develop the liquid cooled GPU server in the data center under the "east to West calculation"?
随机推荐
NLP自然语言处理-机器学习和自然语言处理介绍(一)
Interpretation of the paper: "bert4bitter: a basic model for improving bitter peptide prediction based on transformer (BERT) bidirectional encoder representation"
数据挖掘场景-发票虚开
保存实质审查请求书出现Schema校验失败的解决方法
【AUTOSAR CanDrive 1.学习CanDrive的功能和结构】
论文解读:《一种利用二核苷酸One-hot编码器识别水稻基因组中N6甲基腺嘌呤位点的卷积神经网络》
【Autosar CP通用 1.如何阅读Autosar官方文档】
怎么建立数据分析思维
鋼結構基本原理複習
Gaode positioning - the problem that the permission pop-up box does not appear
硬件知識1--原理圖和接口類型(基於百問網硬件操作大全視頻教程)
利用pycaret:低代码,自动化机器学习框架解决回归问题
Installation and use of APP automated testing tool appium
高电压技术-名词解释题
Build "green computing" and interpret "Intelligent Computing Center"
Chaoslibrary · UE4 pit opening notes
Integrate all lvgl controls into one project (lvgl6.0 version)
Green data center: comprehensive analysis of air-cooled GPU server and water-cooled GPU server
硬件知识2--协议类(基于百问网硬件操作大全视频教程)
Using pycaret: low code, automated machine learning framework to solve classification problems