![](http://datasheet.mmic.net.cn/140000/ST10F252M-4T3_datasheet_5015256/ST10F252M-4T3_175.png)
ST10F252M
CAN modules
Transmission of messages
If the shift register of the CAN core cell is ready for loading and if there is no data transfer
between the IFx registers and message RAM, the MsgVal bits in the message valid register
TxRqst bits in the transmission request register are evaluated. The valid message object
with the highest priority pending transmission request is loaded into the shift register by the
message handler and the transmission is started. The message object’s NewDat bit is reset.
After a successful transmission and if no new data was written to the message object
(NewDat = ‘0’) since the start of the transmission, the TxRqst bit is reset. If TxIE is set,
IntPnd is set after a successful transmission. If the C-CAN has lost the arbitration or if an
error occurred during the transmission, the message is retransmitted as soon as the CAN
bus is free again. If, meanwhile, the transmission of a message with higher priority is
requested, the messages are transmitted in the order of their priority.
Acceptance filtering of received messages
When the arbitration and control field (Identifier + IDE + RTR + DLC) of an incoming
message is completely shifted into the Rx/Tx shift register of the CAN core, the message
handler FSM starts the scanning of the message RAM for a matching valid message object.
To scan the message RAM for a matching message object, the acceptance filtering unit is
loaded with the arbitration bits from the CAN core shift register. The arbitration and mask
fields (including MsgVal, UMask, NewDat, and EoB) of message object 1 are loaded into the
acceptance filtering unit and compared with the arbitration field from the shift register. This is
repeated with each following message object until a matching message object is found or
until the end of the message RAM is reached.
If a match occurs, the scanning is stopped and the message handler FSM proceeds
depending on the type of frame (data frame or remote frame) received.
Reception of data frame
The message handler FSM stores the message from the CAN core shift register into the
respective message object in the message RAM. Not only the data bytes, but all arbitration
bits and the data length code are stored into the corresponding message object. This is
implemented to keep the data bytes connected with the identifier even if arbitration mask
registers are used.
The NewDat bit is set to indicate that new data (not yet seen by the CPU) has been
received. The CPU resets NewDat when it reads the message object. If, at the time of the
reception, the NewDat bit was already set, MsgLst is set to indicate that the previous data
(supposedly not seen by the CPU) is lost. If the RxIE bit is set, the IntPnd bit is set, causing
the interrupt register to point to this message object.
The TxRqst bit of this message object is reset to prevent the transmission of a remote
frame, while the requested data frame has just been received.
Reception of remote frame
When a remote frame is received, three different configurations of the matching message
object have to be considered: