MC68336/376
CAN 2.0B CONTROLLER MODULE (TouCAN)
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
13-12
D. Initialize TouCAN interrupt handler
1. Initialize the interrupt configuration register (CANICR) with a specific
request level and vector base address.
2. Initialize IARB[3:0] to a non-zero value in CANMCR.
3. Set the required mask bits in the IMASK register (for all message buffer
interrupts), in CANCTRL0 (for bus off and error interrupts), and in CANMCR
for the WAKE interrupt.
E. Negate the HALT bit in the module configuration register
1. At this point, the TouCAN will attempt to synchronize with the CAN bus.
NOTE
In both the transmit and receive processes, the first action in prepar-
ing a message buffer should be to deactivate the buffer by setting its
code field to the proper value. This requirement is mandatory to
assure data coherency.
13.5.3 Transmit Process
The transmit process includes preparing a message buffer for transmission, as well as
the internal steps performed by the TouCAN to decide which message to transmit. For
the user, this involves loading the message and ID to be transmitted into a message
buffer and then activating that buffer as an active transmit buffer. Once this is done,
the TouCAN will perform all additional steps necessary to transmit the message onto
the CAN bus.
The user should prepare/change a message buffer for transmission by executing the
following steps.
1. Write the control/status word to hold the transmit buffer inactive (code = %1000)
2. Write the ID_HIGH and ID_LOW words
3. Write the data bytes
4. Write the control/status word (active TX code, TX length)
NOTE
Steps 1 and 4 are mandatory to ensure data coherency while prepar-
ing a message buffer for transmission.
Once an active transmit code is written to a transmit message buffer, that buffer will
begin participating in an internal arbitration process as soon as the CAN bus is sensed
to be free by the receiver, or at the inter-frame space. If there are multiple messages
awaiting transmission, this internal arbitration process selects the message buffer
from which the next frame is transmitted.
When this process is over, and a message buffer is selected for transmission, the
frame from that message buffer is transferred to the serial message buffer for
transmission.
While transmitting, the TouCAN will transmit no more than eight data bytes, even if the
transmit length contains a value greater than eight.