CAN Register Definitions

CAN Register Definitions

TX Message Registers

To avoid priority inversion issues in the transmit path, three transmit buffers are available with a built-in priority arbiter. When a message is transmitted, the priority arbiter evaluates all pending messages and selects the one with the highest priority. The message priority is re-evaluated after each message abort event such as arbitration loss.

uP Bus

Figure 5-1. TX Message Routing

TxMessage 0

PRIORITY

TxMessage 0

 

ARBITER

 

CAN Module

 

 

 

TxMessage 0

CAN BUS

Sending a Message

The following sequence describes how to send a message.

1.Write message into one of the Transmit Message Holding registers TxMessage0/1/2).

2.Request transmission by setting the respective TRX flag. This flag remains set as long as the message holding registers contains this message. The content of the message buffer must not be changed while the TRX flag is set.

3.The TRX flags remain set as long as the message transmit request is pending.

4.The successful transfer of a message is indicated by the respective tx_xfer interrupt and by releasing the TRX flag. Depending on the tx_level configuration settings, an additional interrupt source tx_msg is available to indicate that the Message Holding registers are empty or below a certain level.

Removing a Message from a Transmit Holding Register

A message can be removed from one of the three Transmit Holding registers (TxMessage0/1/2) by setting the TxAbort flag. Use following procedure to remove the contents of a particular TxMessage buffer:

5.Set TxAbort to request the message removal.

6.This flag remains set as long as the message abort request is pending. It is cleared when either the message won arbitration (tx_xmit interrupt active) or the message was removed (tx_xmit interrupt inactive).

63

Page 71
Image 71
Lantronix DSTni-EX manual CAN Register Definitions, TX Message Registers, 1. TX Message Routing, Sending a Message