Fujitsu FR60 Computer Hardware User Manual


  Open as PDF
of 1038
 
727
Chapter 34 CAN Controller
4.CAN Application
Figure 4-2 Initialisation of a Transmit Object
The Arbitration Registers (ID28-0 and Xtd bit) are given by the application. They define the identifier and type
of the outgoing message. If an 11-bit Identifier (“Standard Frame”) is used, it is programmed to ID28 - ID18,
ID17 - ID0 can then be disregarded.
If the TxIE bit is set, the IntPnd bit will be set after a successful transmission of the Message Object.
If the RmtEn bit is set, a matching received Remote Frame will cause the TxRqst bit to be set; the Remote
Frame will autonomously be answered by a Data Frame.
The Data Registers (DLC3-0, Data0-7) are given by the application, TxRqst and RmtEn may not be set
before the data is valid.
The Mask Registers (Msk28-0, UMask, MXtd, and MDir bits) may be used (UMask=’1’) to allow groups of
Remote Frames with similar identifiers to set the TxRqst bit. For details see section 4.4 “Transmission of
Messages” on page 725., handle with care. The Dir bit should not be masked.
4.10 Updating a Transmit Object
The CPU may update the data bytes of a Transmit Object any time via the IFx Interface registers, neither
MsgVal nor TxRqst have to be reset before the update.
Even if only a part of the data bytes are to be updated, all four bytes of the corresponding IFx Data A Register
or IFx Data B Register have to be valid before the content of that register is transferred to the Message
Object. Either the CPU has to write all four bytes into the IFx Data Register or the Message Object is
transferred to the IFx Data Register before the CPU writes the new data bytes.
When only the (eight) data bytes are updated, first 0x0087 is written to the Command Mask Register and then
the number of the Message Object is written to the Command Request Register, concurrently updating the
data bytes and setting TxRqst.
To prevent the reset of TxRqst at the end of a transmission that may already be in progress while the data is
updated, NewDat has to be set together with TxRqst. For details see section section 4.4 “Transmission of
Messages” on page 725.
When NewDat is set together with TxRqst, NewDat will be reset as soon as the new transmission has
started.
4.11 Configuration of a Receive Object
Figure 4-3 shows how a Transmit Object should be initialised.
Figure 4-3 Initialisation of a Receive Object
The Arbitration Registers (ID28-0 and Xtd bit) are given by the application. They define the identifier and type
of accepted received messages. If an 11-bit Identifier (“Standard Frame”) is used, it is programmed to ID28 -
MsgVal Arb Data Mask
Eo
B
Dir NewDat MsgLst
RxI
E
TxIE IntPnd RmtEn TxRqst
1 appl. appl. appl. 1 1 0 0 0 appl. 0 appl. 0
MsgVal Arb Data Mask
Eo
B
Dir NewDat MsgLst
RxI
E
TxIE IntPnd RmtEn TxRqst
1 appl. appl. appl. 1 0 0 0 appl. 0 0 0 0