Motorola MPC533 Reference Manual page 700

Table of Contents

Advertisement

TouCAN Operation
3. Initialize TouCAN interrupt handler
a) Initialize the interrupt configuration register (CANICR) with a specific request
level
b) 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
4. Negate the HALT bit in the module configuration register. At this point, the
TouCAN attempts to synchronize with the CAN bus
In both the transmit and receive processes, the first action in
preparing a message buffer must be to deactivate the buffer by
setting its code field to the proper value. This step is mandatory
to ensure data coherency.
16.4.3
Transmit Process
The transmit process includes preparation of a message buffer for transmission, as well as
the internal steps performed by the TouCAN to decide which message to transmit. 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 performs
all additional steps necessary to transmit the message onto the CAN bus.
The user should prepare or change a message buffer for transmission by executing the
following steps.
1. Write the control/status word to hold the transmit buffer inactive (code = 0b1000)
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)
Steps 1 and 4 are mandatory to ensure data coherency.
Once an active transmit code is written to a transmit message buffer, that buffer begins
participating in an internal arbitration process as soon as the receiver senses that the CAN
bus is free, 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.
16-14
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
NOTE
NOTE
MPC533 Reference Manual
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpc534

Table of Contents