图文详解CAN Log文件 - ASC文件格式

news2024/11/24 1:53:32

目录

1 CAN Log文件 -- ASC文件格式

1.1 Header

1.2 版本编号

1.3 经典CAN网络中的描述

1.3.1 经典CAN Standard标准帧的描述

1.3.2 经典CAN Extended扩展帧的描述

1.3.3 CAN Remote远程帧的描述

1.3.4 CAN Error错误帧的描述

1.4 CANFD网络中的描述

1.4.1 经典CAN Standard标准帧的描述

1.4.2 经典CAN Extended扩展帧的描述

1.4.3 CANFD Standard标准帧的描述

1.4.4 CANFD Extended扩展帧的描述

1.4.5 CAN Remote远程帧的描述

1.4.6 CAN Error错误帧的描述

1.5 换行

2 小结:如何分辨CAN Log文件中的“标准帧”和“扩展帧”

2.1 经典CAN网络中的标准帧和扩展帧

2.2 CANFD网络中的标准帧和扩展帧

结尾


优质博文推荐阅读(单击下方链接,即可跳转):

Vector工具链

CAN Matrix DBC

CAN Matrix Arxml

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:表示CANID的十六进制值;

Length:表示发送/接收该Frame/Message占据总线的时间,单位纳秒;

BitCount:表示发送/接收该Frame/Message由多少各Bit构成;

IDnum:表示CANID的十进制值。

举例:

date Mon Apr 10 02:24:54.471 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.0
   0.036886 CAN 1 Status:chip status error active
   0.036886 CAN 2 Status:chip status error active
   0.101317 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529
   0.201267 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529
   0.301361 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529
   0.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标准帧的差异: IDIDnum后带字符x

举例:

date Mon Apr 10 02:28:37.439 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.0
   0.021151 CAN 1 Status:chip status error active
   0.021151 CAN 2 Status:chip status error active
   0.101557 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x
   0.201483 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x
   0.301437 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x
   0.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.0
   0.041478 CAN 1 Status:chip status error active
   0.041478 CAN 2 Status:chip status error active
   0.101079 1  211             Tx   r 8  Length = 88015 BitCount = 47 ID = 529
   0.101219 1  211x            Tx   r 8  Length = 134015 BitCount = 70 ID = 529x
   0.200845 1  211x            Tx   r 8  Length = 134015 BitCount = 70 ID = 529x
   0.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

CodeExtExtended 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.0
   0.014704 CAN 1 Status:chip status error active
   0.014704 CAN 2 Status:chip status error active
   0.100641 CAN 1 Status:chip status error active  - TxErr: 8 RxErr: 0
   0.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  0
   0.100901 CAN 1 Status:chip status error active  - TxErr: 16 RxErr: 0
   0.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  0
   0.101161 CAN 1 Status:chip status error active  - TxErr: 24 RxErr: 0
   0.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  0
   0.101421 CAN 1 Status:chip status error active  - TxErr: 32 RxErr: 0
   0.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  0
   0.101681 CAN 1 Status:chip status error active  - TxErr: 40 RxErr: 0
   0.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  0
   0.101941 CAN 1 Status:chip status error active  - TxErr: 48 RxErr: 0
   0.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  0
   0.102201 CAN 1 Status:chip status error active  - TxErr: 56 RxErr: 0
   0.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  0
   0.102461 CAN 1 Status:chip status error active  - TxErr: 64 RxErr: 0
   0.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  0
   0.102721 CAN 1 Status:chip status error active  - TxErr: 72 RxErr: 0
   0.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  0
   0.102981 CAN 1 Status:chip status error active  - TxErr: 80 RxErr: 0
   0.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  0
   0.103241 CAN 1 Status:chip status error active  - TxErr: 88 RxErr: 0
   0.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  0
   0.103501 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 0
   0.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  0
   0.103761 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 0
   0.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  0
   0.104021 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 0
   0.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  0
   0.104281 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 0
   0.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  0
   0.104541 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   0.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  0
   1.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   1.014705 CAN 2 Status:chip status error active
   2.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   2.014705 CAN 2 Status:chip status error active
   3.014705 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   3.014705 CAN 2 Status:chip status error active
   4.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   4.014706 CAN 2 Status:chip status error active
   5.014706 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   5.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是有效的.

BitTimingConfArbBitTimingConfData:指的是用于仲裁和数据段的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

BitTimingConfExtArbBitTimingConfExtData:bit timing存储在该段中。如果bit timing不能以旧格式存储,那么<BitTimingConfArb>、<BitTimingConfData>将被设置为0。

  • 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.0
   0.038849 CAN 1 Status:chip status error active
   0.038849 CAN 2 Status:chip status error active
   0.100980 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a
   0.200978 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a
   0.301134 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   200040     2a8f 50a00150 46280150 20001f7e 20000b1a
   0.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.0
   0.035889 CAN 1 Status:chip status error active
   0.035889 CAN 2 Status:chip status error active
   0.100829 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a
   0.200893 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a
   0.300831 CANFD   1 Tx        211x                                  0 0 8  8 00 00 00 00 00 00 00 00   290015  148   200040      37b 50a00150 46280150 20001f7e 20000b1a
   0.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.0
   0.046804 CAN 1 Status:chip status error active
   0.046804 CAN 2 Status:chip status error active
   0.100836 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a
   0.200741 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a
   0.300714 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a
   0.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.0
   0.018020 CAN 1 Status:chip status error active
   0.018020 CAN 2 Status:chip status error active
   0.100571 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a
   0.200634 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a
   0.300783 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   303040 80016b85 50a00150 46280150 20001f7e 20000b1a
   0.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.0
   0.026889 CAN 1 Status:chip status error active
   0.026889 CAN 2 Status:chip status error active
   0.101047 CANFD   1 Tx        211                                   0 0 8  0    88015   47   200050     2c3a 50a00150 46280150 20001f7e 20000b1a
   0.101187 CANFD   1 Tx        211x                                  0 0 8  0   134015   70   220050     6a2a 50a00150 46280150 20001f7e 20000b1a
   0.201045 CANFD   1 Tx        211x                                  0 0 8  0   134015   70   200050     6a2a 50a00150 46280150 20001f7e 20000b1a
   0.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 30: Error in Arbitration Phase1: Error in Data Phase

Bit 40: Error is on a CAN channel1: Error is on a CAN FD channel

all othersreserved, 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.0
   0.036456 CAN 1 Status:chip status error active
   0.036456 CAN 2 Status:chip status error active
   0.100770 CAN 1 Status:chip status error active  - TxErr: 8 RxErr: 0
   0.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 20000b1a
   0.100897 CAN 1 Status:chip status error active  - TxErr: 16 RxErr: 0
   0.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 20000b1a
   0.101024 CAN 1 Status:chip status error active  - TxErr: 24 RxErr: 0
   0.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 20000b1a
   0.101151 CAN 1 Status:chip status error active  - TxErr: 32 RxErr: 0
   0.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 20000b1a
   0.101278 CAN 1 Status:chip status error active  - TxErr: 40 RxErr: 0
   0.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 20000b1a
   0.101405 CAN 1 Status:chip status error active  - TxErr: 48 RxErr: 0
   0.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 20000b1a
   0.101532 CAN 1 Status:chip status error active  - TxErr: 56 RxErr: 0
   0.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 20000b1a
   0.101659 CAN 1 Status:chip status error active  - TxErr: 64 RxErr: 0
   0.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 20000b1a
   0.101786 CAN 1 Status:chip status error active  - TxErr: 72 RxErr: 0
   0.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 20000b1a
   0.101913 CAN 1 Status:chip status error active  - TxErr: 80 RxErr: 0
   0.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 20000b1a
   0.102040 CAN 1 Status:chip status error active  - TxErr: 88 RxErr: 0
   0.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 20000b1a
   0.102167 CAN 1 Status:chip status warning level - TxErr: 96 RxErr: 0
   0.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 20000b1a
   0.102294 CAN 1 Status:chip status warning level - TxErr: 104 RxErr: 0
   0.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 20000b1a
   0.102421 CAN 1 Status:chip status warning level - TxErr: 112 RxErr: 0
   0.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 20000b1a
   0.102548 CAN 1 Status:chip status warning level - TxErr: 120 RxErr: 0
   0.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 20000b1a
   0.102675 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   0.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 20000b1a
   1.036456 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   1.036456 CAN 2 Status:chip status error active
   2.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   2.036457 CAN 2 Status:chip status error active
   3.036457 CAN 1 Status:chip status error passive - TxErr: 128 RxErr: 0
   3.036457 CAN 2 Status:chip status error active

1.5 换行

换行是用CR+LF表示的编码。

2 小结:如何分辨CAN Log文件中的“标准帧”和“扩展帧”

2.1 经典CAN网络中的标准帧和扩展帧

经典CAN网络中的标准帧和扩展帧的差异:

  • 经典CAN标准帧的IDIDnum字段后不带字符x
  • 经典CAN扩展帧的IDIDnum字段后带字符x

举例:

date Mon Apr 10 04:24:18.233 pm 2023
base hex  timestamps absolute
internal events logged
// version 11.0.0
   0.028996 CAN 1 Status:chip status error active
   0.028996 CAN 2 Status:chip status error active
   0.101449 1  211             Tx   d 8 00 00 00 00 00 00 00 00  Length = 242015 BitCount = 124 ID = 529
   0.101745 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x
   0.201469 1  211x            Tx   d 8 00 00 00 00 00 00 00 00  Length = 290015 BitCount = 148 ID = 529x
   0.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.0
   0.008330 CAN 1 Status:chip status error active
   0.008330 CAN 2 Status:chip status error active
   0.100736 CANFD   1 Tx        211                                   1 0 8  8 00 00 00 00 00 00 00 00   107015  139   303040 f801828f 50a00150 46280150 20001f7e 20000b1a
   0.100893 CANFD   1 Tx        211x                                  1 0 8  8 00 00 00 00 00 00 00 00   151015  161   323040 80016b85 50a00150 46280150 20001f7e 20000b1a
   0.101141 CANFD   1 Tx        211                                   0 0 8  8 00 00 00 00 00 00 00 00   242015  124   220040     2a8f 50a00150 46280150 20001f7e 20000b1a
   0.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

结尾

获取更多“汽车电子资讯”和“工具链使用”,

请关注CSDN博客“汽车电子助手”,做您的好助手。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/422232.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

图解并用 C 语言实现非比较排序(计数排序、桶排序和基数排序)

目录 一、计数排序 二、桶排序 三、基数排序 一、计数排序 算法步骤&#xff1a; 找出待排序数组 arr 中的最小值和最大值&#xff08;分别用 min 和 max 表示&#xff09;。 创建一个长度为 max - min 1、元素初始值全为 0 的计数器数组 count。 扫描一遍原始数组&…

Nacos客户端实例注册源码分析-篇一

Nacos客户端实例注册源码分析-篇一 版本 nacos 服务器端 nacos 2.0.3 实例客户端注册入口 注册案例 回到之前搭建的服务提供者项目 9002 &#xff0c;在真实的生产环境下&#xff0c;如果需要让某一个服务注册到 Nacos 的服务当中&#xff0c;我们引入对应的 nacos 发现依赖&…

4月Google Play政策更新,游戏上架需要注意这几点

3月21日&#xff0c;据路透社报道&#xff0c;由于发现国内某知名电商应用存在恶意软件问题&#xff0c;谷歌已暂时将该APP从商店下架&#xff0c;并表示&#xff1a;将该APP下架是一种安全预防措施&#xff0c;已经下载的用户也会收到警告&#xff0c;提示他们进行卸载。 4月…

基于深度学习的动物识别系统(YOLOv5清新界面版,Python代码)

摘要&#xff1a;动物识别系统用于识别和统计常见动物数量&#xff0c;通过深度学习技术检测日常几种动物图像识别&#xff0c;支持图片、视频和摄像头画面等形式。在介绍算法原理的同时&#xff0c;给出Python的实现代码、训练数据集以及PyQt的UI界面。动物识别系统主要用于常…

c/c++:算术运算符,赋值运算,逻辑运算,比较运算,三目运算,逗号运算,数据类型转换

c/c&#xff1a;算术运算符&#xff0c;赋值运算&#xff0c;逻辑运算&#xff0c;比较运算&#xff0c;三目运算&#xff0c;逗号运算&#xff0c;数据类型转换 2022找工作是学历、能力和运气的超强结合体&#xff0c;遇到寒冬&#xff0c;大厂不招人&#xff0c;此时学会c的…

【自定义表格穿梭框】自定义封装jqgrid表格穿梭框,支持分页复选全选(附完整源码及效果图)

【写在前面】其实之前业务中也有这个方面的需求&#xff0c;但是总觉得自己写的有点乱&#xff0c;此时也就借这个机会重新封装一个公共的函数去实现这个穿梭框的效果&#xff0c;支持分页勾选&#xff0c;页面展示已选中和未选择的数据&#xff0c;使得系统操作更友好。 涉及知…

数学建模(三):模拟退火算法(SA)

文章目录模拟退火算法&#xff08;SA&#xff09;一、 概述1、 算法简介2、 核心思想3、 数学原理4、 模拟退火的流程二、 实例分析1、 初始化参数2、 Metrospolis 准则3、 生成新的值4、 获取最优值5、 主程序6、 总代码模拟退火算法&#xff08;SA&#xff09; 一、 概述 1…

折叠屏市场起风,华为、OPPO“你追我赶”

配图来自Canva可画 现如今&#xff0c;智能手机已经成为了人们生活中不可或缺的重要工具&#xff0c;无论是出行&#xff0c;还是社交&#xff0c;亦或是支付&#xff0c;只需要一部智能手机就可以通通搞定。因此&#xff0c;在消费者多样化需求的助推下&#xff0c;智能手机行…

【Spring】—Spring中Bean的配置、作用域

一、Bean的配置 Spring用于生产和管理Spring容器中的Bean&#xff0c;需要开发者对Spring的配置文件进行配置。在实际开发中&#xff0c;最常采用XML格式的配置方式&#xff0c;即通过XML文件来注册并管理Bean之间的依赖关系。 在Spring中&#xff0c;XML配置文件的根元素是…

易基因:全基因组CpG密度和DNA甲基化分析方法比较(MeDIP、RRBS和WGBS)| 研究综述

大家好&#xff0c;这里是专注表观组学十余年&#xff0c;领跑多组学科研服务的易基因。 CpG密度&#xff08;CpG density&#xff09;与各种组织中的DNA甲基化相关。基因组按CpG密度分为&#xff1a;CpG岛&#xff08;CpG island&#xff0c;CGI&#xff09;、CpG岛上下游2kb…

FFMPEG VCL Pack Crack显示位置支持或光标

FFMPEG VCL Pack Crack显示位置支持或光标 FFMPEG VCL Pack是一个组合解决方案和平台&#xff0c;用于在Delphi中录制、转换和传播音频和视频&#xff0c;其中包括音频/视频库中的前一个libavcodec。 FFMPEG VCL Pack功能和选项&#xff1a; 新的Live555公司基于Rtsp Media Ser…

基于深度学习的安全帽检测系统(YOLOv5清新界面版,Python代码)

摘要&#xff1a;安全帽检测系统用于自动化监测安全帽佩戴情况&#xff0c;在需要佩戴安全帽的场合自动安全提醒&#xff0c;实现图片、视频和摄像头等多种形式监测。在介绍算法原理的同时&#xff0c;给出Python的实现代码、训练数据集&#xff0c;以及PyQt的UI界面。安全帽检…

设计模式之迭代器模式(C++)

作者&#xff1a;翟天保Steven 版权声明&#xff1a;著作权归作者所有&#xff0c;商业转载请联系作者获得授权&#xff0c;非商业转载请注明出处 一、迭代器模式是什么&#xff1f; 迭代器模式是一种行为型的软件设计模式&#xff0c;提供一种方法能顺序访问聚合对象中的各个元…

如何做好缓存设计?

大家好&#xff0c;我是易安&#xff01;今天我们来谈一谈缓存应该如何设计。 什么是缓存 缓存是一种临时储存数据的方式。当用户查询数据时&#xff0c;系统会首先在缓存中查找&#xff0c;如果数据已经存在于缓存中&#xff0c;则直接使用&#xff0c;否则系统会到数据的原始…

研报精选230410

目录 【行业230410西南证券】医药行业2023年4月投资月报&#xff1a;看好创新药和中药行情【行业230410国信证券】汽车行业4月投资策略&#xff1a;3月新能源乘用车批发销量预计同比增长32%&#xff0c;持续关注板块年报季报行情【行业230410西南证券】医药行业周报&#xff1a…

【集成架构】探索3种顶级「集成框架」Apache、Spring和Mule

正确的集成框架是绑定应用程序架构构建块的粘合剂。应用程序组件必须不断交换关键数据&#xff0c;以方便用户操作、服务扩展、威胁监视、后端操作、事件触发等。如果没有可靠的集成过程&#xff0c;应用程序和服务故障将淹没软件环境。正确的集成框架是绑定应用程序架构构建块…

【JAVA】#详细介绍!!! synchronized 加锁 详解(1)!

本文分以下几点来介绍synchronized&#xff08;根据JDK1.8&#xff09; 1. 介绍synchronized 2. synchronized 为什么能保证线程安全 3. synchronized 的 用法 4. synchronized 的锁特性 目录 1. 介绍synchronized 2. synchronized的用法 2.1 synchronized修饰指定代码块 2…

如何定位Spark数据倾斜问题,解决方案

文章目录前言一、数据倾斜和数据过量二、 数据倾斜的表现三、定位数据倾斜问题定位思路&#xff1a;查看任务-》查看Stage-》查看代码四、7种典型的数据倾斜场景解决方案一&#xff1a;聚合元数据解决方案二&#xff1a;过滤导致倾斜的key解决方案三&#xff1a;提高shuffle操作…

谁才是天下第一关?

什么是关&#xff0c;中华大地有多少关&#xff1f; 关是往来必由之要处。“山川扼要&#xff0c;是设关津。表封藏&#xff0c;以达道路&#xff0c;天险既呈&#xff0c;人力并济”。 关可分为&#xff1a; 关防&#xff0c;驻兵防守的要塞&#xff1b;关津&#xff0c;水陆…

python笔记:qgrid

在Jupyter Notebook中像在Excel一样操作pandas的DataFrames&#xff0c;如sort/filter&#xff0c;并轻松把操作后的数据用于后续分析。 0 安装 pip install qgrid jupyter nbextension enable --py --sys-prefix qgrid 1 基本使用方法 1.1 数据 import numpy as np import…