当前位置:网站首页>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 ~
边栏推荐
- buuctf-pwn write-ups (9)
- Trust counts the number of occurrences of words in the file
- 第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
- 怎么自动安装pythn三方库
- ClickHouse(03)ClickHouse怎么安装和部署
- JDBC reads a large amount of data, resulting in memory overflow
- 记一次使用Windbg分析内存“泄漏”的案例
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- 开户注册挖财安全吗?有没有风险的?靠谱吗?
- U-Net: Convolutional Networks for Biomedical Images Segmentation
猜你喜欢

彻底理解为什么网络 I/O 会被阻塞?

Sophon autocv: help AI industrial production and realize visual intelligent perception

Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.

About Estimation with Cross-Validation
![Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]](/img/8b/a60fc36115580f018445e4c2a28a9d.png)
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]

About Statistical Power(统计功效)

Pytorch yolov5 training custom data

《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!

记录Pytorch中的eval()和no_grad()

The main thread anr exception is caused by too many binder development threads
随机推荐
LeetCode 6111. 螺旋矩阵 IV
Simulate the hundred prisoner problem
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
Nanjing University: Discussion on the training program of digital talents in the new era
Electron installation problems
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
Clickhouse (03) how to install and deploy Clickhouse
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
Check namespaces and classes
How to choose the most formal and safe external futures platform?
sample_ What is the relationship between rate, sample and duration
让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
vs2017 qt的各种坑
ConvMAE(2022-05)
node_exporter内存使用率不显示
使用Jmeter虚拟化table失败
记一次使用Windbg分析内存“泄漏”的案例
Use QT to traverse JSON documents and search sub objects
如何获取飞机穿过雷达两端的坐标
Problems encountered in the project u-parse component rendering problems