Skip to main content

Constant Definitions (CAN)

This section describes CAN-specific constant definitions used by this product.

Main APIs

Definition List

ItemConstant Name
CAN Error FlagMPX_CAN_ERRFLG_*
CAN Error InformationMPX_CAN_ERR_*
CAN Termination ResistorMPX_CAN_TERMINATE_*
CAN Operation ModeMPX_CAN_MODE_*
CAN Arbitration BaudrateMPX_CAN_PARAM_ABR_*
CAN Sample PointMPX_CAN_PARAM_SP_*
CAN Data BaudrateMPX_CAN_PARAM_DBR_*
CAN ProtocolMPX_CAN_PROTOCOL_*
CAN Bit Rate SwitchMPX_CAN_BRS_*
CAN Error BehaviorMPX_CAN_ERR_BEHAVIOR_*
CAN One-shot TransmissionMPX_CAN_ONESHOT_*
CAN Frame TypeMPX_CAN_FRAME_TYPE_*
CAN Slot Enable/DisableMPX_CAN_SLOT_*
CAN ID FormatMPX_CAN_IDE_*
CAN Remote Transmission RequestMPX_CAN_RTR_*
CAN Transmission Trigger TypeMPX_CAN_SIM_TRIGGER_*
CAN Increment Enable/DisableMPX_CAN_SIM_INC_*
CAN Slot Change Request InfoMPX_CAN_SLOT_REQ_*

Definition Details (CAN)

CAN Error Flag

Constant NameValueDescription
MPX_CAN_ERRFLG_FALSE0 (0x0)No error
MPX_CAN_ERRFLG_TRUE1 (0x1)Error present

CAN Error Information

Constant NameValueDescription
MPX_CAN_ERR_NONE0 (0x0)No error
MPX_CAN_ERR_BUS1 (0x1)Bus error
MPX_CAN_ERR_WARN2 (0x2)Error warning
MPX_CAN_ERR_PASV4 (0x4)Error passive
MPX_CAN_ERR_BUSOFF8 (0x8)Bus-off start
MPX_CAN_ERR_BUSWAKE16 (0x10)Recovery from bus-off
MPX_CAN_ERR_OVERLOAD32 (0x20)Overload
MPX_CAN_ERR_BUSLOCK64 (0x40)Channel bus lock
MPX_CAN_ERR_ARBLOST128 (0x80)Arbitration lost
MPX_CAN_ERR_STAFF256 (0x100)Stuff error
MPX_CAN_ERR_FORM512 (0x200)Form error
MPX_CAN_ERR_ACK1024 (0x400)ACK error
MPX_CAN_ERR_CRC2048 (0x800)CRC error
MPX_CAN_ERR_RECEIVE4096 (0x1000)Recessive bit error
MPX_CAN_ERR_DOMINANT8192 (0x2000)Dominant error
MPX_CAN_ERR_DELIMITER16384 (0x4000)ACK delimiter error

CAN Termination Resistor

Constant NameValueDescription
MPX_CAN_TERMINATE_DISABLE0 (0x0)No termination resistor
MPX_CAN_TERMINATE_ENABLE1 (0x1)Termination resistor enabled

CAN Operation Mode

Constant NameValueDescription
MPX_CAN_MODE_LISTEN0 (0x0)Monitor mode (no ACK)
MPX_CAN_MODE_MONITOR1 (0x1)Monitor mode (with ACK)
MPX_CAN_MODE_SIM2 (0x2)Simulation mode
MPX_CAN_MODE_NONE255 (0xFF)No operation

CAN Arbitration Baudrate

Constant NameValueDescription
MPX_CAN_PARAM_ABR_1M0 (0x0)1Mbps
MPX_CAN_PARAM_ABR_500K1 (0x1)500Kbps
MPX_CAN_PARAM_ABR_250K2 (0x2)250Kbps
MPX_CAN_PARAM_ABR_125K3 (0x3)125Kbps

CAN Sample Point

Constant NameValueDescription
MPX_CAN_PARAM_SP_60P0 (0x0)60%
MPX_CAN_PARAM_SP_65P1 (0x1)65%
MPX_CAN_PARAM_SP_70P2 (0x2)70%
MPX_CAN_PARAM_SP_75P3 (0x3)75%
MPX_CAN_PARAM_SP_80P4 (0x4)80%
MPX_CAN_PARAM_SP_85P5 (0x5)85%

CAN Data Baudrate

Constant NameValueDescription
MPX_CAN_PARAM_DBR_5M0 (0x0)5Mbps
MPX_CAN_PARAM_DBR_4M1 (0x1)4Mbps
MPX_CAN_PARAM_DBR_2M2 (0x2)2Mbps
MPX_CAN_PARAM_DBR_1M3 (0x3)1Mbps
MPX_CAN_PARAM_DBR_500K4 (0x4)500Kbps

CAN Protocol

Constant NameValueDescription
MPX_CAN_PROTOCOL_CAN0 (0x0)CAN
MPX_CAN_PROTOCOL_CANFD1 (0x1)CAN-FD

CAN Bit Rate Switch

Constant NameValueDescription
MPX_CAN_BRS_DISABLE0 (0x0)BRS disabled
MPX_CAN_BRS_ENABLE1 (0x1)BRS enabled

CAN Error Behavior

Constant NameValueDescription
MPX_CAN_ERR_BEHAVIOR_ACTIVE0 (0x0)Error active
MPX_CAN_ERR_BEHAVIOR_PASSIVE1 (0x1)Error passive

CAN One-shot Transmission

Constant NameValueDescription
MPX_CAN_ONESHOT_DISABLE0 (0x0)One-shot disabled
MPX_CAN_ONESHOT_ENABLE1 (0x1)One-shot enabled

CAN Frame Type

Constant NameValueDescription
MPX_CAN_FRAME_TYPE_PERIODIC0 (0x0)Periodic transmission
MPX_CAN_FRAME_TYPE_PERIODIC_TRIGGER1 (0x1)Start periodic transmission by event
MPX_CAN_FRAME_TYPE_EVENT2 (0x2)Event transmission
MPX_CAN_FRAME_TYPE_EVENTPERIODIC3 (0x3)Event-periodic transmission

CAN Slot Enable/Disable

Constant NameValueDescription
MPX_CAN_SLOT_DISABLE0 (0x0)Slot disabled
MPX_CAN_SLOT_ENABLE1 (0x1)Slot enabled

CAN ID Format

Constant NameValueDescription
MPX_CAN_IDE_STD0 (0x0)Standard ID
MPX_CAN_IDE_EXT1 (0x1)Extended ID

CAN Remote Transmission Request

Constant NameValueDescription
MPX_CAN_RTR_DATA0 (0x0)Data frame
MPX_CAN_RTR_REMOTE1 (0x1)Remote frame

CAN Transmission Trigger Type

Constant NameValueDescription
MPX_CAN_SIM_TRIGGER_USER0 (0x0)User-specified
MPX_CAN_SIM_TRIGGER_CAN1 (0x1)Reception of specified CAN ID
MPX_CAN_SIM_TRIGGER_CANFD2 (0x2)Reception of specified CAN FD ID

CAN Increment Enable/Disable

Constant NameValueDescription
MPX_CAN_SIM_INC_FALSE0 (0x0)No increment
MPX_CAN_SIM_INC_TRUE1 (0x1)Increment enabled

CAN Slot Change Request Info

Constant NameValueDescription
MPX_CAN_SLOT_REQ_NONE0 (0x0)No transmission trigger, no data rewrite
MPX_CAN_SLOT_REQ_DATA1 (0x1)No transmission trigger, data rewrite
MPX_CAN_SLOT_REQ_TRG2 (0x2)Transmission trigger, no data rewrite
MPX_CAN_SLOT_REQ_DATA_TRG3 (0x3)Transmission trigger and data rewrite

Supplementary Information

Baudrate and Sample Point in CAN/CAN FD Protocol

In CAN/CAN FD protocol, available sample points depend on the combination of arbitration baudrate and data baudrate.

BaudrateArbitration Sample PointData Sample Point
ArbitrationData60%65%70%75%80%85%60%65%70%75%80%85%
125kbps500kbps
1Mbps
2Mbps
250kbps500kbps
1Mbps
2Mbps
4Mbps
5Mbps
500kbps500kbps
1Mbps
2Mbps
4Mbps
5Mbps
1Mbps500kbps
1Mbps
2Mbps
4Mbps
5Mbps

Combinations with arbitration baudrate 125kbps and data baudrate 4Mbps or 5Mbps are not configurable.