因工作研究需要,担心精华内容丢失。故全文转载,转载自:图文详解CAN Log文件 - ASC文件格式 - CSDN
-
Vector提供了两种记录数据格式的格式规范:BLF和ASC。
-
在Vector提供的CAN_LOG_TRIGGER_ASC_Format.pdf文件中,规定了CANoe/CANalyzer ASC记录中CAN、Log和Trigger event的格式。
1 CAN Log文件 -- ASC文件格式
1.1 Header
一个ASCII格式的日志文件以一个header开始。header包含关于日志文件的一般信息。
Format | date <WeekDay> <Month> <Date> <Fulltime> <Year> base <hex |dec> timestamps <absolute |relative> <”” |no> internal events logged |
Example | date Wed Apr 16 09:21:13.159 am 2014 base hex timestamps absolute internal events logged |
base:表示记录的数值是hex十六进制或dec十进制的符号。
timestamps:表示时间戳是absolute绝对写入测量的开始时间还是relative相对于前一个事件。
internal:events logged表示是否记录了内部事件。
1.2 版本编号
从CANalyzer/CANoe v7.0开始,版本号以注释的形式写在Header之后:
Format Since v7.0 | // version <major>.<minor>.<patch> |
Example | // version 8.2.1 |
<major>
.<minor>
表示CANalyzer/CANoe的版本号
<patch>
表示CANalyzer/CANoe主版本中的修改版本(如服务包中的修改)。
1.3 经典CAN网络中的描述
该部分列出了CANoe/CANalyzer ASC记录中的所有CAN event。
1.3.1 经典CAN Standard标准帧的描述
Format since v8.0 | <Time> <Channel> <ID> <Dir> d <DLC> <D0> <D1>...<D8> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum> <MessageFlags> |
Example | 0.003040 1 123 Tx d 2 00 00 Length = 768000 BitCount = 67 ID = 291 |
ID:表示 CAN ID 的十六进制值;
Length:表示发送/接收该Frame/Message占据总线的时间,单位纳秒;
BitCount:表示发送/接收该Frame/Message由多少各Bit构成;
IDnum:表示CAN ID的十进制值。
举例:
date Mon Apr 10 02:24:54.471 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.036886 CAN 1 Status:chip status error active0.036886 CAN 2 Status:chip status error active0.101317 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 5290.201267 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 5290.301361 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 5290.401419 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 529
1.3.2 经典CAN Extended扩展帧的描述
Format since v8.0 | <Time> <Channel> <ID>x <Dir> d <DLC> <D0> <D1>...<D8> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum>x <MessageFlags> |
Example | 4.876870 1 54C5638x Tx d 8 00 00 00 00 00 00 00 00 Length = 1704000 BitCount = 145 ID = 88888888x |
与经典CAN标准帧的差异: ID和IDnum后带字符x。
举例:
date Mon Apr 10 02:28:37.439 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.021151 CAN 1 Status:chip status error active0.021151 CAN 2 Status:chip status error active0.101557 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x0.201483 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x0.301437 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x0.401151 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x
1.3.3 CAN Remote远程帧的描述
Format since v8.5 | <Time> <Channel> <ID> <Dir> r <DLC> Length = <MessageDuration> BitCount = <MessageLength> ID = <IDnum>x |
Example | 2.5010 1 200 Tx r 8 Length = 1704000 BitCount = 145 ID = 88888888x |
与经典CAN**标准 **/ 扩展帧的差异:没有<D0> <D1>...<D8>
。
举例:
date Mon Apr 10 02:31:19.810 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.041478 CAN 1 Status:chip status error active0.041478 CAN 2 Status:chip status error active0.101079 1 211 Tx r 8 Length = 88015 BitCount = 47 ID = 5290.101219 1 211x Tx r 8 Length = 134015 BitCount = 70 ID = 529x0.200845 1 211x Tx r 8 Length = 134015 BitCount = 70 ID = 529x0.200939 1 211 Tx r 8 Length = 88015 BitCount = 47 ID = 529
1.3.4 CAN Error错误帧的描述
CAN Error Frame | |
Format since v7.5 | Interfaces with CAN-Core: <Time> <Channel> ErrorFrame Flags = <flags> CodeExt = <codeExt> Code = <code> ID = <ID> DLC = <DLC> Position = <Position> Length = <Length> Flags: 定义参数Code, CodeExt, ID, DLC, Position和Length的有效性的Bit field。Bit含义: 0:SJA 1000 ECC是有效的 1:矢量CAN核心错误代码有效 2:矢量CAN核心错误位置有效 3:矢量CAN核心帧长度(ns)有效 Code: Vector CAN-Core的Bit含义: Bit 0-5: 0: Bit Error 1: Form Error 2: Stuff Error 3: Other Error 4: CRC Error 5: Ack-Del-Error 7: Ack-Error Bit 6-7: 0: RX-NAK-Error 1: TX-NAK-Error 2: RX-Error 3: TX-Error |
CodeExt:Extended error flags Bit 0-4:Segment (only SJA1000) Bit 5:Direction, 1=RX Bit 6-11:Error Code 0 Bit Error 1 Form Error 2 Stuff Error 3 Other Error 4 CRC Error 5 ACK- DEL Error 7 ACK Error Bit 12-13:Extended Direction 0 RX NAK 1 TX NAK 2 RX 3 TX Bit 14:1 =错误帧由应用程序发送 备注 1 只对带有Vector CAN-Core的接口有效(CANcardXLe, VN7600, VN16xx, VN89xx和其他)。 2 ID、DLC和data field的有效性取决于干扰的类型和位置。 例如: 如果信息在ID- field受到干扰,那么只有ID的第一个Bit可能有效,但DLC和data field无效。错误位置不是干扰的位置。 例如: 如果错误位置位于CRC-field,那么信息可能在任何其他field受到干扰,错误的CRC是该干扰的结果。 | |
Examples | 1.592186 2 ErrorFrame Flags = 0xe CodeExt = 0x20a2 Code = 0x82 ID = 0 DLC = 0 Position = 5 Length = 11300 |
CAN Error Event | |
Format | <Time> CAN <Channel> Status:<Error> <Time> CAN <Channel> Status:<Error> - TxErr: <TxCount> RxErr: <RxCount> TxCount: transmit error count寄存器的值 RxCount: receive error count寄存器的值 |
Example | 0.0006 CAN 2 Status:chip status error active 2137.317027 CAN 2 Status:chip status error active - TxErr: 8 RxErr: 0 |
举例:
date Mon Apr 10 02:33:32.536 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.014704 CAN 1 Status:chip status error active0.014704 CAN 2 Status:chip status error active0.100641 CAN 1 Status:chip status error active - TxErr: 8 RxErr: 00.100642 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.100901 CAN 1 Status:chip status error active - TxErr: 16 RxErr: 00.100902 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.101161 CAN 1 Status:chip status error active - TxErr: 24 RxErr: 00.101162 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.101421 CAN 1 Status:chip status error active - TxErr: 32 RxErr: 00.101422 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.101681 CAN 1 Status:chip status error active - TxErr: 40 RxErr: 00.101682 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.101941 CAN 1 Status:chip status error active - TxErr: 48 RxErr: 00.101942 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.102201 CAN 1 Status:chip status error active - TxErr: 56 RxErr: 00.102202 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.102461 CAN 1 Status:chip status error active - TxErr: 64 RxErr: 00.102462 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.102721 CAN 1 Status:chip status error active - TxErr: 72 RxErr: 00.102722 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.102981 CAN 1 Status:chip status error active - TxErr: 80 RxErr: 00.102982 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.103241 CAN 1 Status:chip status error active - TxErr: 88 RxErr: 00.103242 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.103501 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 00.103502 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.103761 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 00.103762 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.104021 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 00.104022 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.104281 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 00.104282 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 00.104541 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 00.104542 1 ErrorFrame Flags = 0xfffe CodeExt = 0x31d9 Code = 0xc7 ID = 0x211 DLC = 8 Position = 99 Length = 226015 Data = 0 0 0 0 0 0 0 01.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 01.014705 CAN 2 Status:chip status error active2.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 02.014705 CAN 2 Status:chip status error active3.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 03.014705 CAN 2 Status:chip status error active4.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 04.014706 CAN 2 Status:chip status error active5.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 05.014706 CAN 2 Status:chip status error active
1.4 CANFD网络中的描述
该部分列出了CANoe/CANalyzer ASC记录中的所有经典CAN event和CAN FD channel上的CAN FD event。
1.4.1 经典CAN Standard标准帧的描述
Format since v8.1 | <Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D8> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> |
Example | 0.105364 CANFD 1 Tx 1 0 0 1 1 01 112000 59 200040 39b5 46500250 460a0250 20011736 20010205 |
ID:表示CANID的十六进制值;
BRS:表示CANFD Frame的BRS位;
ESI:表示CANFD Frame的DEI位;
DLC:表示CANFD Frame的控制段DTC;
DataLength:message的有效长度,以字节为单位。
MessageDuration:表示发送/接收该Frame/Message占据总线的时间,单位纳秒;
MessageLength:表示发送/接收该Frame/Message由多少各Bit构成;
Flags:Bit含义
- Bit 0: Reserved, must be 0
- Bit 1: Reserved, for internal use
- Bit 2: 1=NERR (1=single wire on low speed CAN)
- Bit 3: 1=High voltage wake up
- Bit 4: 1=Remote frame (only CAN)
- Bit 5: Reserved, must be 0
- Bit 6: 1= Tx Acknowledge
- Bit 7: 1= Tx Request
- Bit 8: Reserved, must be 0
- Bit 9: SRR (CAN FD)
- Bit 10: R0
- Bit 11: R1
- Bit 12: FDF bit 0: CAN frame 1: CAN FD frame
- Bit 13: BRS bit (CAN FD)
- Bit 14: ESI bit (CAN FD)
- Bit 15: Reserved, must be 0
- Bit 16: Reserved, must be 0
- Bit 17: 1= Frame is part ofa burst
- Bit 18: Single shot mode: Frame could not be transmitted
- Bit 19: Single shot mode: If bit 18 set to 1, then this bit reports the reason.0 = arbitration lost 1=frame disturbed
- Bit 20: Reserved, for internal use
- Bit 21: Reserved, for internal use
- Bit 22 -31: Reserved, must be 0
CRC:message的校验和;
- Bit 0 – 20: CRC
- Bit 21 – 26: Reserved for internal use
- Bit 27 – 29: Stuff count field
- Bit 30: Stuff count field parity
- Bit 31: ISO format. 如果设置为1,那么该报文是CAN FD ISO格式,并且stuff count是有效的.
BitTimingConfArb和BitTimingConfData:指的是用于仲裁和数据段的bit timing参数。这些段可以解释为32位长的bit field。
- Bit 0-7: Quartz Frequency in kHz
- Bit 8-15: Prescaler
- Bit 16-23: BTL Cycles
- Bit 24-31: Sampling Point
BitTimingConfExtArb和BitTimingConfExtData:bit timing存储在该段中。如果bit timing不能以旧格式存储,那么
- Bit 0 – 7: TSEG1-1
- Bit 8 – 15: TSEG2-1
- Bit 16 – 27: Prescaler
- Bit 28 – 31: Quartz Frequency (enumeration). Supported values: 0: 16 MHz, 1: 32 MHz, 2: 80 MHz
举例:
date Mon Apr 10 02:38:41.859 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.038849 CAN 1 Status:chip status error active0.038849 CAN 2 Status:chip status error active0.100980 CANFD 1 Tx 211 0 0 8 8 00 00 00 00 00 00 00 00 242015 124 200040 2a8f 50a00150 46280150 20001f7e 20000b1a0.200978 CANFD 1 Tx 211 0 0 8 8 00 00 00 00 00 00 00 00 242015 124 200040 2a8f 50a00150 46280150 20001f7e 20000b1a0.301134 CANFD 1 Tx 211 0 0 8 8 00 00 00 00 00 00 00 00 242015 124 200040 2a8f 50a00150 46280150 20001f7e 20000b1a0.400976 CANFD 1 Tx 211 0 0 8 8 00 00 00 00 00 00 00 00 242015 124 200040 2a8f 50a00150 46280150 20001f7e 20000b1a
1.4.2 经典CAN Extended扩展帧的描述
Format since v8.1 | <Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D8> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> |
Example | 0.100995 CANFD 2 Rx 10001x 0 0 1 1 01 156000 82 200000 149a 46500250 460a0250 20011736 20010205 |
各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。
举例:
date Mon Apr 10 02:42:26.030 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.035889 CAN 1 Status:chip status error active0.035889 CAN 2 Status:chip status error active0.100829 CANFD 1 Tx 211x 0 0 8 8 00 00 00 00 00 00 00 00 290015 148 200040 37b 50a00150 46280150 20001f7e 20000b1a0.200893 CANFD 1 Tx 211x 0 0 8 8 00 00 00 00 00 00 00 00 290015 148 200040 37b 50a00150 46280150 20001f7e 20000b1a0.300831 CANFD 1 Tx 211x 0 0 8 8 00 00 00 00 00 00 00 00 290015 148 200040 37b 50a00150 46280150 20001f7e 20000b1a0.400909 CANFD 1 Tx 211x 0 0 8 8 00 00 00 00 00 00 00 00 290015 148 200040 37b 50a00150 46280150 20001f7e 20000b1a
1.4.3 CANFD Standard标准帧的描述
Format since v8.1 | <Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> |
Example | 0.151061 CANFD 1 Tx 2 0 0 2 2 02 03 150000 78 301040 10151 46500250 460a0250 20011736 20010205 |
各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。
举例:
date Mon Apr 10 02:48:53.277 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.046804 CAN 1 Status:chip status error active0.046804 CAN 2 Status:chip status error active0.100836 CANFD 1 Tx 211 1 0 8 8 00 00 00 00 00 00 00 00 107015 139 303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.200741 CANFD 1 Tx 211 1 0 8 8 00 00 00 00 00 00 00 00 107015 139 303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.300714 CANFD 1 Tx 211 1 0 8 8 00 00 00 00 00 00 00 00 107015 139 303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.400735 CANFD 1 Tx 211 1 0 8 8 00 00 00 00 00 00 00 00 107015 139 303040 f801828f 50a00150 46280150 20001f7e 20000b1a
1.4.4 CANFD Extended扩展帧的描述
Format since v8.1 | <Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> |
Example | 0.105537 CANFD 2 Rx 10001x 0 0 1 1 01 174015 91 301000 bfd9 46500250 460a0250 20011736 20010205 |
各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。
举例:
date Mon Apr 10 02:49:57.722 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.018020 CAN 1 Status:chip status error active0.018020 CAN 2 Status:chip status error active0.100571 CANFD 1 Tx 211x 1 0 8 8 00 00 00 00 00 00 00 00 151015 161 303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.200634 CANFD 1 Tx 211x 1 0 8 8 00 00 00 00 00 00 00 00 151015 161 303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.300783 CANFD 1 Tx 211x 1 0 8 8 00 00 00 00 00 00 00 00 151015 161 303040 80016b85 50a00150 46280150 20001f7e 20000b1a0.400604 CANFD 1 Tx 211x 1 0 8 8 00 00 00 00 00 00 00 00 151015 161 303040 80016b85 50a00150 46280150 20001f7e 20000b1a
1.4.5 CAN Remote远程帧的描述
Format | <Time> CANFD <Channel> <Dir> <ID> <SymbolicName> <BRS> <ESI> <DLC> <DataLength> <MessageDuration> <MessageLength> <Flags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> |
Example | 0.300981 CANFD 1 Tx 50005x 0 0 5 0 140000 73 200050 7a60 46500250 460a0250 20011736 20010205 |
各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。
举例:
date Mon Apr 10 02:52:19.883 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.026889 CAN 1 Status:chip status error active0.026889 CAN 2 Status:chip status error active0.101047 CANFD 1 Tx 211 0 0 8 0 88015 47 200050 2c3a 50a00150 46280150 20001f7e 20000b1a0.101187 CANFD 1 Tx 211x 0 0 8 0 134015 70 220050 6a2a 50a00150 46280150 20001f7e 20000b1a0.201045 CANFD 1 Tx 211x 0 0 8 0 134015 70 200050 6a2a 50a00150 46280150 20001f7e 20000b1a0.201139 CANFD 1 Tx 211 0 0 8 0 88015 47 220050 2c3a 50a00150 46280150 20001f7e 20000b1a
1.4.6 CAN Error错误帧的描述
CAN FD Error Frame | |
Format | <Time> CANFD <Channel> <Dir> ErrorFrame <ErrorText> <flags> <code> <codeExt> <Phase> <Position> <ID> <BRS> <ESI> <DLC> <DataLength> <D1> … <D64> <MessageDuration> <extFlags> <CRC> <BitTimingConfArb> <BitTimingConfData> <BitTimingConfExtArb> <BitTimingConfExtData> <extFlags>: extFlags(Extended error flags): Bit 0:0: FDF is 0 (CAN Error Frame);1: FDF is 1 (CAN FD Error Frame) Bit 1:0: BRS is 0;1: BRS is 1 Bit 2:0: ESI is 0;1: ESI is 1 Bit 3:0: Error in Arbitration Phase;1: Error in Data Phase Bit 4:0: Error is on a CAN channel;1: Error is on a CAN FD channel all others:reserved, must be set to 0 |
Example: Classic CAN | 0.051203 CANFD 1 Rx ErrorFrame Stuff Error fffe 82 20a2 Arb.5 0 0 0 0 0 11984 10 0 46500250 460a0250 20011736 20010205 |
Example: CAN FD | 10.006898 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31ca Arb.556 44 0 0 f 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1331984 11 0 46500250 460a0250 20011736 20010205 |
各字段的解释详见“1.4.1 经典CAN Standard标准帧的描述”。
举例:
date Mon Apr 10 02:55:04.694 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.036456 CAN 1 Status:chip status error active0.036456 CAN 2 Status:chip status error active0.100770 CAN 1 Status:chip status error active - TxErr: 8 RxErr: 00.100770 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.100897 CAN 1 Status:chip status error active - TxErr: 16 RxErr: 00.100897 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101024 CAN 1 Status:chip status error active - TxErr: 24 RxErr: 00.101024 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101151 CAN 1 Status:chip status error active - TxErr: 32 RxErr: 00.101151 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101278 CAN 1 Status:chip status error active - TxErr: 40 RxErr: 00.101278 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101405 CAN 1 Status:chip status error active - TxErr: 48 RxErr: 00.101405 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101532 CAN 1 Status:chip status error active - TxErr: 56 RxErr: 00.101532 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101659 CAN 1 Status:chip status error active - TxErr: 64 RxErr: 00.101659 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101786 CAN 1 Status:chip status error active - TxErr: 72 RxErr: 00.101786 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.101913 CAN 1 Status:chip status error active - TxErr: 80 RxErr: 00.101913 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102040 CAN 1 Status:chip status error active - TxErr: 88 RxErr: 00.102040 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102167 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 00.102167 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102294 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 00.102294 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102421 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 00.102421 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102548 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 00.102548 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a0.102675 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 00.102675 CANFD 1 Tx ErrorFrame Not Acknowledge error, dominant error flag fffe c7 31da Arb. 109 211 1 0 8 8 00 00 00 00 00 00 00 00 93015 13 f8000000 50a00150 46280150 20001f7e 20000b1a1.036456 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 01.036456 CAN 2 Status:chip status error active2.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 02.036457 CAN 2 Status:chip status error active3.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 03.036457 CAN 2 Status:chip status error active
1.5 换行
换行是用CR
+LF
表示的编码。
2 小结:如何分辨CAN Log文件中的“标准帧”和“扩展帧”
2.1 经典CAN网络中的标准帧和扩展帧
经典CAN网络中的标准帧和扩展帧的差异:
- 经典CAN标准帧的ID和IDnum字段后不带字符x;
- 经典CAN扩展帧的ID和IDnum字段后带字符x。
举例:
date Mon Apr 10 04:24:18.233 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.028996 CAN 1 Status:chip status error active0.028996 CAN 2 Status:chip status error active0.101449 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 5290.101745 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x0.201469 1 211x Tx d 8 00 00 00 00 00 00 00 00 Length = 290015 BitCount = 148 ID = 529x0.201717 1 211 Tx d 8 00 00 00 00 00 00 00 00 Length = 242015 BitCount = 124 ID = 529
2.2 CANFD网络中的标准帧和扩展帧
CANFD网络中,可能同时存在:经典CAN标准帧,经典CAN扩展帧,CANFD标准帧,CANFD**扩展帧。
- 经典CAN/CANFD标准帧的ID字段后不带字符x;
- 经典CAN/CANFD扩展帧的ID字段后带字符x;
- Flags字段的的Bit 12: FDF bit,其0表示经典CAN frame;1表示CAN FD frame。
举例:
date Mon Apr 10 03:28:33.279 pm 2023
base hex timestamps absolute
internal events logged
// version 11.0.00.008330 CAN 1 Status:chip status error active0.008330 CAN 2 Status:chip status error active0.100736 CANFD 1 Tx 211 1 0 8 8 00 00 00 00 00 00 00 00 107015 139 303040 f801828f 50a00150 46280150 20001f7e 20000b1a0.100893 CANFD 1 Tx 211x 1 0 8 8 00 00 00 00 00 00 00 00 151015 161 323040 80016b85 50a00150 46280150 20001f7e 20000b1a0.101141 CANFD 1 Tx 211 0 0 8 8 00 00 00 00 00 00 00 00 242015 124 220040 2a8f 50a00150 46280150 20001f7e 20000b1a0.101437 CANFD 1 Tx 211x 0 0 8 8 00 00 00 00 00 00 00 00 290015 148 220040 37b 50a00150 46280150 20001f7e 20000b1a
X 参考文献
- 图文详解CAN Log文件 - ASC文件格式 - CSDN
- Vector工具链
- CAN Matrix DBC
- CAN Matrix Arxml