当前位置:网站首页>A2L file parsing based on CAN bus (3)
A2L file parsing based on CAN bus (3)
2022-07-05 18:27:00 【Like brother s】
List of articles
Preface
In the second part A2L In the article of file parsing , This paper introduces the definition of common interfaces . In actual use , Define parameters . The following describes the specific configuration and definition .

MOD_COMMON
This keyword is used to specify the general description data of the module , Then take it as the standard of this module .
/begin MOD_COMMON "This is MOD_COMMON"
BYTE_ORDER MSB_LAST
ALIGNMENT_BYTE 1
ALIGNMENT_WORD 2
ALIGNMENT_LONG 4
ALIGNMENT_FLOAT32_IEEE 4
ALIGNMENT_FLOAT64_IEEE 8
ALIGNMENT_INT64 8
/end MOD_COMMON
ALIGNMENT_BYTE: Declare BYTE Alignment mode . If the parameter is missing , The alignment is 1. Others in the same way .
BYTE_ORDER: Byte order ,MSB_LAST=Intel, The default is Intel
MOD_PAR
MOD_PAR Keywords are used to describe the management data to be configured for the device . In addition to comments , All parameters are optional . It's not used for the time being .
XCP data
stay A2ML In the definition of XCP structure :
"XCP" struct {
taggedstruct Common_Parameters; /* default parameters */
taggedstruct {
block "XCP_ON_CAN" struct {
struct CAN_Parameters; /* specific for CAN */
taggedstruct Common_Parameters; /* overruling of default */
};
}; /* transport layer parameters*/
};
Common_Parameters Definition
/*********************** start of Common Parameters ***************************/
taggedstruct Common_Parameters {
block "PROTOCOL_LAYER" struct Protocol_Layer;
block "SEGMENT" struct Segment;
block "DAQ" struct Daq;
block "PAG" struct Pag;
block "PGM" struct Pgm;
block "DAQ_EVENT" taggedunion Daq_Event;
}; /******************** end of Common Parameters *****************************/
Defines the interface introduced in Section 2 .
IF_DATA Definition XCP
PROTOCOL_LAYER
/begin IF_DATA XCP
/begin PROTOCOL_LAYER
0x0101
0x07D0
0x2710
0x07D0
0x07D0
0x07D0
0x07D0
0x00
0x08
0x08
BYTE_ORDER_MSB_LAST
ADDRESS_GRANULARITY_BYTE
OPTIONAL_CMD SET_MTA
OPTIONAL_CMD UPLOAD
OPTIONAL_CMD SHORT_UPLOAD
OPTIONAL_CMD TRANSPORT_LAYER_CMD
OPTIONAL_CMD DOWNLOAD
OPTIONAL_CMD DOWNLOAD_NEXT
OPTIONAL_CMD SHORT_DOWNLOAD
OPTIONAL_CMD SET_CAL_PAGE
OPTIONAL_CMD GET_CAL_PAGE
OPTIONAL_CMD GET_PAG_PROCESSOR_INFO
OPTIONAL_CMD GET_PAGE_INFO
OPTIONAL_CMD SET_DAQ_PTR
OPTIONAL_CMD WRITE_DAQ
OPTIONAL_CMD SET_DAQ_LIST_MODE
OPTIONAL_CMD GET_DAQ_LIST_MODE
OPTIONAL_CMD START_STOP_DAQ_LIST
OPTIONAL_CMD START_STOP_SYNCH
OPTIONAL_CMD GET_DAQ_PROCESSOR_INFO
OPTIONAL_CMD GET_DAQ_EVENT_INFO
OPTIONAL_CMD FREE_DAQ
OPTIONAL_CMD ALLOC_DAQ
OPTIONAL_CMD ALLOC_ODT
OPTIONAL_CMD ALLOC_ODT_ENTRY
COMMUNICATION_MODE_SUPPORTED BLOCK
SLAVE
/end PROTOCOL_LAYER
The first number is the version number , The last seven are T1-T7

The next two are MAX_CTO and MAX_DTO

BYTE_ORDER_MSB_LAST Express Intel Format
The following is the defined command , Because of this XCP of no avail Programming , So related to programming CMD Not within the definition .
COMMUNICATION_MODE_SUPPORTED Define slave
DAQ
/begin DAQ
DYNAMIC
0x00
0x2D
0x00
OPTIMISATION_TYPE_DEFAULT
ADDRESS_EXTENSION_FREE
IDENTIFICATION_FIELD_TYPE_ABSOLUTE
GRANULARITY_ODT_ENTRY_SIZE_DAQ_BYTE
0x07
OVERLOAD_INDICATION_PID
/begin STIM
GRANULARITY_ODT_ENTRY_SIZE_STIM_BYTE
0x07
/end STIM
at present XCP Only support DYNAMIC DAQ
MAX_DAQ by 0. Because it's dynamic DAQ
MAX_EVENT_CHANNEL by 0x2D, According to the fact EVENT Number decides , The configuration is larger than the actual EVENT Count .
MIN_DAQ by 0. Because it's dynamic DAQ
OPTIMISATION_TYPE; This default
ADDRESS_EXTENSION:free
I don't know where the configuration is . There are displays in the calibration software that can be configured .
IDENTIFICATION_FIELD_TYPE_ABSOLUTE, Configure

OVERLOAD_INDICATION_PID, I don't know where the configuration is . There are displays in the calibration software that can be configured .
MAX_ODT_ENTRY_SIZE_DAQ:0x07
because TIMESTAMP The choice is NO_TIME_STAMP, So timestamp is not available

EVENT
With one of them event For example :
/begin EVENT
"Dlt_EvtMsg"
"Dlt_EvtM"
0x1E
DAQ
0x01
0x00
0x06
0x00
/end EVENT
Event name :Dlt_EvtMsg
Short name :Dlt_EvtM
Event number :0x1E
Data transfer type :DAQ
Maximum DAQ LIST Number :1
Event cycle :0
Event time unit :6,“UNIT_1NS” = 0,
“UNIT_10NS” = 1,
“UNIT_100NS” = 2,
“UNIT_1US” = 3,
“UNIT_10US” = 4,
“UNIT_100US” = 5,
“UNIT_1MS” = 6,
“UNIT_10MS” = 7,
“UNIT_100MS” = 8,
“UNIT_1S” = 9,
“UNIT_1PS” = 10,
“UNIT_10PS” = 11,
“UNIT_100PS” = 12
Event priority :0
XCP_ON_CAN
CAN_Parameters
0x0102
CAN_ID_MASTER 0x0xxx
CAN_ID_SLAVE 0x0xxx
BAUDRATE 0x07A120
SAMPLE_POINT 0x50
SAMPLE_RATE SINGLE
BTL_CYCLES 0x0A
SJW 0x01
MAX_DLC_REQUIRED
XCP on CAN version Version number :0x0102
CAN_ID_MASTER: host ID-0x0xxx
CAN_ID_SLAVE: Slave ID-0x0xxx
BAUDRATE:500K,0x07A120
SAMPLE_POINT: Sampling point 80
SAMPLE_RATE: Sampling rate SINGLE
BTL_CYCLES: Every bit Of slot Count ,10
SJW: Length of synchronization segment ,1
MAX_DLC_REQUIRED: Master slave DLC Always be 8
PROTOCOL_LAYER Consistent with the previous settings

CAN The relevant information is in DBC or Arxml Set in .
summary
thus ,A2L The contents of the document are introduced . About XCP Protocol and code implementation , Continue to study later when you are free .
If you find this article helpful , Welcome to thumb up , Focus on , Collection , forward ~~~
Your encouragement is the greatest support for my little brother ~~~
Built a WX official account ,《 Automotive e-learning notes 》 If you are interested, you can pay attention to ~~~ Articles will be updated synchronously ~
边栏推荐
- [PM2 details]
- Record eval() and no in pytoch_ grad()
- Deep copy and shallow copy [interview question 3]
- Use JMeter to record scripts and debug
- The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
- Vulnhub's darkhole_ two
- 英语句式参考
- Crontab 日志:如何记录我的 Cron 脚本的输出
- 爬虫01-爬虫基本原理讲解
- 关于服装ERP,你想知道的都在这里了
猜你喜欢

U-Net: Convolutional Networks for Biomedical Images Segmentation

nano的CAN通信

Use QT to traverse JSON documents and search sub objects
![Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]](/img/b2/d019c3f0b85a6c0d334a092fa6c23c.png)
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]

使用JMeter录制脚本并调试

About Statistical Power(统计功效)

爬虫01-爬虫基本原理讲解

Thoroughly understand why network i/o is blocked?

瞅一瞅JUC提供的限流工具Semaphore

websocket 工具的使用
随机推荐
开户注册股票炒股安全吗?有没有风险的?靠谱吗?
文章中的逻辑词
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集
Generate XML schema from class
Memory leak of viewpager + recyclerview
Use of print function in MATLAB
Xiaobai getting started with NAS - quick building private cloud tutorial series (I) [easy to understand]
The main thread anr exception is caused by too many binder development threads
Sophon autocv: help AI industrial production and realize visual intelligent perception
Pytorch yolov5 training custom data
node_exporter内存使用率不显示
怎么自动安装pythn三方库
Writing writing writing
[use electron to develop desktop on youqilin]
[QNX Hypervisor 2.2用户手册]6.3.2 配置VM
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
【pm2详解】
Star ring technology data security management platform defender heavy release
U-Net: Convolutional Networks for Biomedical Images Segmentation
音视频包的pts,dts,duration的由来.