当前位置:网站首页>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 ~
边栏推荐
- ViewPager + RecyclerView的内存泄漏
- 记录Pytorch中的eval()和no_grad()
- @Extension, @spi annotation principle
- [paddleclas] common commands
- Vulnhub's darkhole_ two
- Reptile 01 basic principles of reptile
- Introduction to Resampling
- LeetCode 6109. 知道秘密的人数
- 爬虫01-爬虫基本原理讲解
- [utiliser Electron pour développer le Bureau sur youkirin devrait]
猜你喜欢
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
vulnhub之darkhole_2
vs2017 qt的各种坑
分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载
Wu Enda team 2022 machine learning course, coming
Star ring technology data security management platform defender heavy release
Fix vulnerability - mysql, ES
彻底理解为什么网络 I/O 会被阻塞?
随机推荐
怎么自动安装pythn三方库
《力扣刷题计划》复制带随机指针的链表
Failed to virtualize table with JMeter
模拟百囚徒问题
含重复元素取不重复子集[如何取子集?如何去重?]
Fix vulnerability - mysql, ES
Writing writing writing
Nacos distributed transactions Seata * * install JDK on Linux, mysql5.7 start Nacos configure ideal call interface coordination (nanny level detail tutorial)
Is it complicated to open an account? Is online account opening safe?
ConvMAE(2022-05)
小林coding的内存管理章节
兄弟组件进行传值(显示有先后顺序)
Vulnhub's darkhole_ two
About Estimation with Cross-Validation
彻底理解为什么网络 I/O 会被阻塞?
音视频包的pts,dts,duration的由来.
Use QT to traverse JSON documents and search sub objects
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
写作写作写作写作
Logical words in Articles