COMMELL MPX-2515 User Manual
Page 27

Commell MPX-2515 User’s Guide Rev 0100
Taiwan Commate Computer Inc.
27
Transmit priority is a prioritization within the MCP2515 of the pending
transmittable messages. This is independent from, and not necessarily related to,
any prioritization implicit in the message arbitration scheme built into the CAN
protocol.
There are four levels of transmit priority. If TXBnCTRL.TXP<1:0> for a particular
message buffer is set to 11, that buffer has the highest possible priority. If
TXBnCTRL.TXP<1:0> for a particular buffer is 00, that buffer has the lowest
possible priority.
ABORTING TRANSMISSION
The MCU can request to abort a message in a specific message buffer by clearing
the associated TXBnCTRL.TXREQ bit.
In addition, all pending messages can be requested to be aborted by setting the
CANCTRL.ABAT bit. This bit must be reset (typically after the TXREQ bits have
been verified to be cleared) to continue transmitting messages.
Messages that were transmitting when the abort was requested will continue to
transmit. If the message does not successfully complete transmission (i.e., lost
arbitration or was interrupted by an error frame), it will then be aborted.
1.8.2 MCP_LOAD_TXB0SIDH
The MCP_LOAD_TXB0SIDH command loads the bytes in the Request Packet to
the associated MCP2515 registers in order to complete the corresponding message
transmission on the CAN bus.
#define CCP_CAN_TX_SERVICE 0X23 /* command category code */
#define MCP_LOAD_TXB0SIDH 0X40 /* sub-command code */
#define EP2 2 /* Endpoint 2 */
#define EP3 3 /* Endpoint 3 */
OFFSET
BULK OUT (EP2)
BULK IN (EP1)
SIZEOF_DATA
0X14
0X05
COMMAND
0X23
0X23
ERROR
0X00
Error code
DATA_0
0X40
Number of bytes return
(0X04)
DATA_1
Overwrite flag
EFLG before transmitting
DATA_2
Reserved
TXB0CTRL before
transmitting
DATA_3
0X30
EFLG after transmitted
DATA_4
Value to load to TXB0CTRL
TXB0CTRL after
transmitted