Constant Definitions (define)
This chapter explains the constant definitions provided by this product.
List of Definitions
Definition Details
API Return Codes
| Constant name | Description |
|---|
E_OK | Completed successfully |
E_PARAM | Invalid parameter |
E_DEVICE | Device not detected |
E_COMM | USB communication error |
E_TGT | Target error |
E_TRG_BUSY | Trigger configuration failed |
E_DCT_FULL | Direct transmission FIFO full |
E_LOG_OVER | Log replay data size exceeded |
E_STATUS | Status error |
E_TIMEOUT | USB communication timeout |
E_OTHER | Unknown error |
LED Settings
| Constant name | Description |
|---|
MPX_LED_OFF | LED off |
MPX_LED_ON | LED on or blinking |
MicroPeckerX Status
| Constant name | Description |
|---|
MPX_STATUS_RUN | APP started |
MPX_STATUS_PARAM | Waiting for parameter configuration |
MPX_STATUS_SYNC | Waiting for synchronization |
MPX_STATUS_NONE | Inactive |
MPX_STATUS_MON | Monitoring |
MPX_STATUS_SIM | Simulation mode |
MPX_STATUS_LOG | Log replay mode |
MPX_STATUS_BUR | Burst mode (single frame) |
MPX_STATUS_BUR_LOG | Burst mode (log replay) |
MPX_STATUS_E_CAN | CAN transition error |
MPX_STATUS_UNKNOWN | Unknown status |
For the MicroPeckerX status transition diagram, refer to MicroPeckerX Status Transition Diagram.
Sync Modes
| Constant name | Description |
|---|
MPX_SYNC_MASTER | Master mode |
MPX_SYNC_SLAVE | Slave mode |
Log Acquisition Modes
| Constant name | Description |
|---|
MPX_GETLOGMODE_CALLBACK | Callback mode |
MPX_GETLOGMODE_GETLOGAPI | API mode |
Log Types
| Constant name | Description | Notes |
|---|
MPX_LOG_TYPE_CAN | CAN | |
MPX_LOG_TYPE_CANFD | CAN FD (bit rate switch enabled) | |
MPX_LOG_TYPE_CANFD_NOBRS | CAN FD (bit rate switch disabled) | |
MPX_LOG_TYPE_EMPTY | Timestamp only | Occurs only when the log acquisition mode is MPX_GETLOGMODE_CALLBACK (callback mode). |
Log Direction
| Constant name | Description |
|---|
MPX_LOG_DIR_RX | Received log |
MPX_LOG_DIR_TX | Transmitted log |
Error Flag
| Constant name | Description |
|---|
CAN_ERRFLG_FALSE | No error |
CAN_ERRFLG_TRUE | Error occurred |
| Constant name | Description |
|---|
CAN_ERR_NONE | No error |
CAN_ERR_BUS | Bus error |
CAN_ERR_WARN | Error warning |
CAN_ERR_PASV | Error passive |
CAN_ERR_BUSOFF | Bus-off start |
CAN_ERR_BUSWAKE | Bus-off recovery |
CAN_ERR_OVERLOAD | Overload |
CAN_ERR_BUSLOCK | Channel bus lock |
CAN_ERR_ARBLOST | Arbitration lost |
CAN_ERR_STAFF | Stuff error |
CAN_ERR_FORM | Form error |
CAN_ERR_ACK | ACK error |
CAN_ERR_CRC | CRC error |
CAN_ERR_RECESSIVE | Recessive bit error |
CAN_ERR_DOMINANT | Dominant bit error |
CAN_ERR_DELIMITER | ACK delimiter error |
Buffer Overrun Flag
| Constant name | Description |
|---|
MPX_LOG_BUFOVER_FALSE | Buffer overrun has not occurred |
MPX_LOG_BUFOVER_TRUE | Buffer overrun occurred |
Termination Resistor
| Constant name | Description |
|---|
MPX_CAN_TERMINATE_DISABLE | Termination resistor disabled |
MPX_CAN_TERMINATE_ENABLE | Termination resistor enabled |
Operation Modes
| Constant name | Description |
|---|
MPX_MODE_LISTEN | Monitor mode (without ACK) |
MPX_MODE_MONITOR | Monitor mode (with ACK) |
MPX_MODE_CAN_SIM | Simulation mode |
MPX_MODE_CAN_LOGREPLAY | Log replay mode |
MPX_MODE_CAN_BURST_FRM | Burst transfer mode (single frame) |
MPX_MODE_CAN_BURST_LOG | Burst transfer mode (log replay) |
MPX_MODE_NONE | No operation |
Arbitration Baud Rates
| Constant name | Description |
|---|
MPX_CAN_PARAM_ABR_1M | 1 Mbps |
MPX_CAN_PARAM_ABR_500K | 500 kbps |
MPX_CAN_PARAM_ABR_250K | 250 kbps |
MPX_CAN_PARAM_ABR_125K | 125 kbps |
Data Baud Rates
| Constant name | Description |
|---|
MPX_CAN_PARAM_DBR_5M | 5 Mbps |
MPX_CAN_PARAM_DBR_4M | 4 Mbps |
MPX_CAN_PARAM_DBR_2M | 2 Mbps |
MPX_CAN_PARAM_DBR_1M | 1 Mbps |
MPX_CAN_PARAM_DBR_500K | 500 kbps |
Sample Points
| Constant name | Description |
|---|
MPX_CAN_PARAM_SP_60P | 60% |
MPX_CAN_PARAM_SP_65P | 65% |
MPX_CAN_PARAM_SP_70P | 70% |
MPX_CAN_PARAM_SP_75P | 75% |
MPX_CAN_PARAM_SP_80P | 80% |
MPX_CAN_PARAM_SP_85P | 85% |
The available sample points depend on the combination of arbitration and data baud rates. See Baud Rate and Sample Points.
Protocols
| Constant name | Description |
|---|
MPX_CAN_PROTOCOL_CAN | CAN |
MPX_CAN_PROTOCOL_CANFD | CAN FD |
Bit Rate Switch
| Constant name | Description |
|---|
MPX_CAN_BRS_DISABLE | Bit rate switch disabled |
MPX_CAN_BRS_ENABLE | Bit rate switch enabled |
Error Behavior
| Constant name | Description |
|---|
MPX_CAN_ERR_BEHAVIOR_ACTIVE | Error active |
MPX_CAN_ERR_BEHAVIOR_PASSIVE | Error passive |
One-Shot Transmission
| Constant name | Description |
|---|
MPX_CAN_ONESHOT_DISABLE | One-shot transmission disabled |
MPX_CAN_ONESHOT_ENABLE | One-shot transmission enabled |
Frame Types
| Constant name | Description |
|---|
MPX_CAN_FRAME_TYPE_PERIODIC | Periodic transmission |
MPX_CAN_FRAME_TYPE_PERIODIC_TRIGGER | Start periodic transmission when an event occurs |
MPX_CAN_FRAME_TYPE_EVENT | Event transmission |
MPX_CAN_FRAME_TYPE_EVENTPERIODIC | Event-based periodic transmission |
Slot Enablement
| Constant name | Description |
|---|
MPX_CAN_SLOT_DISABLE | Slot disabled |
MPX_CAN_SLOT_ENABLE | Slot enabled |
Final Frame Flag
| Constant name | Description |
|---|
MPX_CAN_LOG_NOTLAST | Not the final frame in log replay |
MPX_CAN_LOG_LAST | Final frame in log replay |
| Constant name | Description |
|---|
MPX_CAN_IDE_STD | Standard ID |
MPX_CAN_IDE_EXT | Extended ID |
Remote Transmission Request
| Constant name | Description |
|---|
MPX_CAN_RTR_DATA | Data frame |
MPX_CAN_RTR_REMOTE | Remote frame |
Trigger Types
| Constant name | Description |
|---|
MPX_CAN_SIM_TRIGGER_USER | User-specified |
MPX_CAN_SIM_TRIGGER_CAN | Receive specified CAN ID |
MPX_CAN_SIM_TRIGGER_CANFD | Receive specified CAN FD ID |
Increment Setting
| Constant name | Description |
|---|
MPX_CAN_SIM_INC_FALSE | No increment |
MPX_CAN_SIM_INC_TRUE | Increment enabled |
Slot Update Request
| Constant name | Description |
|---|
MPX_CAN_SLOT_REQ_NONE | No transmission trigger, no data overwrite |
MPX_CAN_SLOT_REQ_DATA | No transmission trigger, overwrite data |
MPX_CAN_SLOT_REQ_TRG | Transmission trigger, no data overwrite |
MPX_CAN_SLOT_REQ_DATA_TRG | Transmission trigger and data overwrite |
| Constant name | Description |
|---|
MPX_CAN_FDF_OFF | CAN format |
MPX_CAN_FDF_ON | CAN FD format |
Log Size for Callback Mode
| Constant name | Description |
|---|
MPX_GETLOG_CALLBACK_HEADERSIZE | Header size (excluding data field) |
Log Size for API Mode
| Constant name | Description |
|---|
MPX_GETLOG_SIZE | Log size |
Log Size for Log Replay
| Constant name | Description |
|---|
MPX_CAN_SIM_REPLAY_HEADERSIZE | Header size (excluding data field) |
Baud Rate and Sample Points
The available sample points depend on the combination of arbitration and data baud rates.
| Baud rate | Arbitration sample points | Data sample points |
|---|
| Arbitration | Data | 60% | 65% | 70% | 75% | 80% | 85% | 60% | 65% | 70% | 75% | 80% | 85% |
|---|
| 125 kbps | 500 kbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 1 Mbps | - | - | - | - | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 2 Mbps | - | - | - | - | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 250 kbps | 500 kbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 1 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 2 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 4 Mbps | - | - | - | - | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 5 Mbps | - | - | - | - | ○ | ○ | - | - | - | ○ | - | - |
|---|
| 500 kbps | 500 kbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 1 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 2 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 4 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 5 Mbps | ○ | ○ | - | ○ | ○ | ○ | - | - | - | ○ | - | - |
|---|
| 1 Mbps | 500 kbps | ○ | - | ○ | - | ○ | - | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 1 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ |
|---|
| 2 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 4 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | ○ | - | ○ | - | ○ | - |
|---|
| 5 Mbps | ○ | ○ | ○ | ○ | ○ | ○ | - | - | - | ○ | - | - |
|---|
The combination of an arbitration baud rate of 125 kbps with a data baud rate of 4 Mbps or 5 Mbps cannot be configured.