Constant Definitions (CAN)
This section describes CAN-specific constant definitions used by this product.
Main APIs
Definition List
Definition Details (CAN)
CAN Error Flag
| Constant Name | Value | Description |
|---|
| MPX_CAN_ERRFLG_FALSE | 0 (0x0) | No error |
| MPX_CAN_ERRFLG_TRUE | 1 (0x1) | Error present |
| Constant Name | Value | Description |
|---|
| MPX_CAN_ERR_NONE | 0 (0x0) | No error |
| MPX_CAN_ERR_BUS | 1 (0x1) | Bus error |
| MPX_CAN_ERR_WARN | 2 (0x2) | Error warning |
| MPX_CAN_ERR_PASV | 4 (0x4) | Error passive |
| MPX_CAN_ERR_BUSOFF | 8 (0x8) | Bus-off start |
| MPX_CAN_ERR_BUSWAKE | 16 (0x10) | Recovery from bus-off |
| MPX_CAN_ERR_OVERLOAD | 32 (0x20) | Overload |
| MPX_CAN_ERR_BUSLOCK | 64 (0x40) | Channel bus lock |
| MPX_CAN_ERR_ARBLOST | 128 (0x80) | Arbitration lost |
| MPX_CAN_ERR_STAFF | 256 (0x100) | Stuff error |
| MPX_CAN_ERR_FORM | 512 (0x200) | Form error |
| MPX_CAN_ERR_ACK | 1024 (0x400) | ACK error |
| MPX_CAN_ERR_CRC | 2048 (0x800) | CRC error |
| MPX_CAN_ERR_RECEIVE | 4096 (0x1000) | Recessive bit error |
| MPX_CAN_ERR_DOMINANT | 8192 (0x2000) | Dominant error |
| MPX_CAN_ERR_DELIMITER | 16384 (0x4000) | ACK delimiter error |
CAN Termination Resistor
| Constant Name | Value | Description |
|---|
| MPX_CAN_TERMINATE_DISABLE | 0 (0x0) | No termination resistor |
| MPX_CAN_TERMINATE_ENABLE | 1 (0x1) | Termination resistor enabled |
CAN Operation Mode
| Constant Name | Value | Description |
|---|
| MPX_CAN_MODE_LISTEN | 0 (0x0) | Monitor mode (no ACK) |
| MPX_CAN_MODE_MONITOR | 1 (0x1) | Monitor mode (with ACK) |
| MPX_CAN_MODE_SIM | 2 (0x2) | Simulation mode |
| MPX_CAN_MODE_NONE | 255 (0xFF) | No operation |
CAN Arbitration Baudrate
| Constant Name | Value | Description |
|---|
| MPX_CAN_PARAM_ABR_1M | 0 (0x0) | 1Mbps |
| MPX_CAN_PARAM_ABR_500K | 1 (0x1) | 500Kbps |
| MPX_CAN_PARAM_ABR_250K | 2 (0x2) | 250Kbps |
| MPX_CAN_PARAM_ABR_125K | 3 (0x3) | 125Kbps |
CAN Sample Point
| Constant Name | Value | Description |
|---|
| MPX_CAN_PARAM_SP_60P | 0 (0x0) | 60% |
| MPX_CAN_PARAM_SP_65P | 1 (0x1) | 65% |
| MPX_CAN_PARAM_SP_70P | 2 (0x2) | 70% |
| MPX_CAN_PARAM_SP_75P | 3 (0x3) | 75% |
| MPX_CAN_PARAM_SP_80P | 4 (0x4) | 80% |
| MPX_CAN_PARAM_SP_85P | 5 (0x5) | 85% |
CAN Data Baudrate
| Constant Name | Value | Description |
|---|
| MPX_CAN_PARAM_DBR_5M | 0 (0x0) | 5Mbps |
| MPX_CAN_PARAM_DBR_4M | 1 (0x1) | 4Mbps |
| MPX_CAN_PARAM_DBR_2M | 2 (0x2) | 2Mbps |
| MPX_CAN_PARAM_DBR_1M | 3 (0x3) | 1Mbps |
| MPX_CAN_PARAM_DBR_500K | 4 (0x4) | 500Kbps |
CAN Protocol
| Constant Name | Value | Description |
|---|
| MPX_CAN_PROTOCOL_CAN | 0 (0x0) | CAN |
| MPX_CAN_PROTOCOL_CANFD | 1 (0x1) | CAN-FD |
CAN Bit Rate Switch
| Constant Name | Value | Description |
|---|
| MPX_CAN_BRS_DISABLE | 0 (0x0) | BRS disabled |
| MPX_CAN_BRS_ENABLE | 1 (0x1) | BRS enabled |
CAN Error Behavior
| Constant Name | Value | Description |
|---|
| MPX_CAN_ERR_BEHAVIOR_ACTIVE | 0 (0x0) | Error active |
| MPX_CAN_ERR_BEHAVIOR_PASSIVE | 1 (0x1) | Error passive |
CAN One-shot Transmission
| Constant Name | Value | Description |
|---|
| MPX_CAN_ONESHOT_DISABLE | 0 (0x0) | One-shot disabled |
| MPX_CAN_ONESHOT_ENABLE | 1 (0x1) | One-shot enabled |
CAN Frame Type
| Constant Name | Value | Description |
|---|
| MPX_CAN_FRAME_TYPE_PERIODIC | 0 (0x0) | Periodic transmission |
| MPX_CAN_FRAME_TYPE_PERIODIC_TRIGGER | 1 (0x1) | Start periodic transmission by event |
| MPX_CAN_FRAME_TYPE_EVENT | 2 (0x2) | Event transmission |
| MPX_CAN_FRAME_TYPE_EVENTPERIODIC | 3 (0x3) | Event-periodic transmission |
CAN Slot Enable/Disable
| Constant Name | Value | Description |
|---|
| MPX_CAN_SLOT_DISABLE | 0 (0x0) | Slot disabled |
| MPX_CAN_SLOT_ENABLE | 1 (0x1) | Slot enabled |
| Constant Name | Value | Description |
|---|
| MPX_CAN_IDE_STD | 0 (0x0) | Standard ID |
| MPX_CAN_IDE_EXT | 1 (0x1) | Extended ID |
CAN Remote Transmission Request
| Constant Name | Value | Description |
|---|
| MPX_CAN_RTR_DATA | 0 (0x0) | Data frame |
| MPX_CAN_RTR_REMOTE | 1 (0x1) | Remote frame |
CAN Transmission Trigger Type
| Constant Name | Value | Description |
|---|
| MPX_CAN_SIM_TRIGGER_USER | 0 (0x0) | User-specified |
| MPX_CAN_SIM_TRIGGER_CAN | 1 (0x1) | Reception of specified CAN ID |
| MPX_CAN_SIM_TRIGGER_CANFD | 2 (0x2) | Reception of specified CAN FD ID |
CAN Increment Enable/Disable
| Constant Name | Value | Description |
|---|
| MPX_CAN_SIM_INC_FALSE | 0 (0x0) | No increment |
| MPX_CAN_SIM_INC_TRUE | 1 (0x1) | Increment enabled |
CAN Slot Change Request Info