User’s Manual
BOSCH
- 58/77 -
Revision 1.6
TTCAN
11.11.02
manual_about.fm
4.3.3 Changing a Transmit Object
In an application for that the number of Message Objects in the TTCAN module is not
sufficient, the Transmit Objects may be managed dynamically. The CPU writes the whole
message (Arbitration, Control, and Data) into the Interface Register. The Command Mask
Register is set to 0x00B7 for the transfer of the contents into the designated Message Object.
Neither MsgVal nor TxRqst have to be reset before this operation.
If a previously requested transmission of that Message Object is not completed but already in
progress, it will be continued; it will however not be repeated if it is disturbed.
4.3.4 Reading Received Messages
The CPU may read a received message any time via the IFx Interface Registers, the data
consistency is guaranteed by the Message Handler state machine.
Typically the CPU will write first 0x007F to the Command Mask Register and then the number
of the Message Object to the Command Request Register. That combination will transfer the
whole received message from the Message RAM into the Message Buffer Register.
Additionally, the bits NewDat and IntPnd are cleared in the Message RAM (not in the
Message Buffer). The values of these bits in the Message Control Register always reflect the
status before resetting the bits.
If the Message Object uses masks for acceptance filtering, the arbitration bits show which of
the different matching messages has been received.
The actual value of NewDat shows whether a new message has been received since last time
this Message Object was read. The actual value of MsgLst shows whether more than one
message has been received since last time this Message Object was read. MsgLst will not be
automatically reset.
4.3.5 Requesting New Data for a Receive Object
By means of a Remote Frame, the CPU may request another CAN node to provide new data
for a receive object. Setting the TxRqst bit of a receive object will cause the transmission of a
Remote Frame with the receive object’s identifier. This Remote Frame triggers the other CAN
node to start the transmission of the matching Data Frame. If the matching Data Frame is
received before the Remote Frame could be transmitted, the TxRqst bit is automatically reset.
Setting the TxRqst bit without changing the contents of a Message Object requires the value
0x0084 in the Command Mask Register.
4.3.6 Reading from a FIFO Buffer
Several messages may be accumulated in a set of Message Objects which are concatenated
to form a FIFO Buffer before the application program is required (in order to avoid the loss of
data) to empty the buffer. A FIFO Buffer of length N will store the first (N-1) and the last
received message since last time it was cleared.
A FIFO Buffer is cleared by reading and resetting the NewDat bits of all its Message Objects,
starting at the FIFO Object with the lowest message number. This should be done in a
subroutine following the example shown in figure 17.
Reading from a FIFO Buffer Message Object and resetting its NewDat bit is handled the same
way as reading from a single Message Object.