Status Frames

Status frames can be received or discarded by configuring the parameter AllowStatusFrames on the connected PCAN Channel. This is carried out using the SetValue(PcanChannel, PcanParameter, UInt32) method.

The status frame data will be placed into a PcanMessage object. The field MsgType of these objects will have the flag Status set.

The ID and DLC fields can be ignored. The first 4 data bytes of the message represent a 32 bit value in big endian format (MSB is byte 0, LSB is byte 3), that maps the reported PcanStatus value. The following table shows the possible values for a status frame:

Data0

Data1

Data2

Data3

Identifier

Code

Description

00h

00h

00h

00h

OK

0000h

The CAN controller has been successfully activated.

00h

00h

00h

02h

Overrun

0002h

The CAN controller has been read out too late.

00h

00h

00h

04h

BusLight

0004h

Bus error: An error counter has reached the 'light' limit.

00h

00h

00h

08h

BusWarning

0008h

Bus error: An error counter has reached the 'warning' limit.

00h

04h

00h

00h

BusPassive

4000h

The CAN controller is in error passive state.

00h

00h

00h

08h

BusHeavy

0008h

Bus error: An error counter has reached the 'heavy' limit.

00h

00h

00h

10h

BusOff

0010h

Bus error: CAN Controller is in 'bus-off' state.

Remarks

According to the communication being used (CAN / CAN FD) some of the status values described above may or may not be supported.

See Also