当前位置:网站首页>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 ~
边栏推荐
- Copy the linked list with random pointer in the "Li Kou brush question plan"
- Penetrate the whole intranet through socks agent
- Find the first k small element select_ k
- How to choose the most formal and safe external futures platform?
- JDBC reads a large amount of data, resulting in memory overflow
- Memory leak of viewpager + recyclerview
- FCN: Fully Convolutional Networks for Semantic Segmentation
- 记一次使用Windbg分析内存“泄漏”的案例
- 金太阳开户安全吗?万一免5开户能办理吗?
- Sibling components carry out value transfer (there is a sequence displayed)
猜你喜欢
随机推荐
Thoroughly understand why network i/o is blocked?
音视频包的pts,dts,duration的由来.
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
Writing writing writing
LeetCode 6111. Spiral matrix IV
About statistical power
英语句式参考
About Estimation with Cross-Validation
第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
Use JMeter to record scripts and debug
《ClickHouse原理解析与应用实践》读书笔记(5)
第十届全球云计算大会 | 华云数据荣获“2013-2022十周年特别贡献奖”
瞅一瞅JUC提供的限流工具Semaphore
Introduction to Resampling
Clickhouse (03) how to install and deploy Clickhouse
buuctf-pwn write-ups (9)
Find the first k small element select_ k
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
Introduction to Resampling
Electron installation problems