Data transfer from/to message RAM 和消息内存直接的数据传输
When data transfer starts between the message interface registers and message RAM, the Busy bit in the IFx Command Request Register is set to "1". After the transfer has finished, the Busy bit is cleared to "0".(See Figure 3-1)
当数据开始在消息接口寄存器和消息内存直接传送,IFx Command Request Register的Busy位被设置为1,传输完成后被清零(见图3-1)
The IFx Command Register selects whether to transfer complete data or only partial data of one message object. The structure of the message RAM does not allow the writing of single bits/bytes of one message object. The complete data of one message object is always written to the message RAM. Therefore, the data from the message interface registers to the message RAM is transferred in a read-modify-write cycle.
The IFx Command Register选择是传送全部数据还是部分数据。消息内存结构不允许写消息对象的单个位/字节,从消息接口寄存器到消息内存的数据传送是在一个读改写周期进行的。
3.2. Message transmission 消息传送 Sending messages
操作:If there is no data transfer between the message interface registers and message RAM, the MsgVal bit in the CAN Message Valid Register and the TxRqst bit in the CAN Transmit Request Register are evaluated. A valid message object with the highest priority of pending transmission requests is transferred to the shift register for transmission. Then the NewDat bit of the message object is reset to "0".
如果没有数据在消息接口和消息内存直接传送,the CAN Message Valid Register 中的MsgVal位和the CAN Transmit Request Register中的TxRqst位被评定(?)。一个有效的具有高优先级的传送请求的消息对象被传送到移位寄存器去传送。随后the message object 的NewDat位被清零。
结果:When the transmission has finished successfully, and if there is no new data in the message object (NewDat = "0"), the TxRqst bit is reset to "0". If TxIE is set to "1", then the IntPnd bit is set to "1" after a successful transmission. If the CAN controller lost the arbitration on the CAN bus, or if an error occurred during transmission, the message is resent immediately when the CAN bus becomes idle.
当传送完成,并且消息对象中没有新的数据(NewDat = "0"), the TxRqst bit复位到0,If TxIE设置为"1",然后成功传送后IntPnd位设置为1,如果CAN控制器失去总线仲裁,或传送发生错误,消息会在总线闲置时重发。
Transmission priority 传输优先级
The transmission priority of the message objects is determined by the message number. Message object 1 has the highest priority, while message object 32 (the largest number of the installed message objects) has the lowest priority. If two or more transmission requests are pending, they are transferred in the order of corresponding message number from smallest to largest.
消息 对象的传输优先级是由消息号决定的。消息对象1有最高的优先级,而消息对象32(消息对象的最大号)有最低优先级。如果两个或以上的传输请求产生,他们按消息号的由小到大的顺序传输这些消息对象。
<Notes>
In one of the following conditions, the messages may not be sent until any of the events described below occurs.在下列条件,消息将等待描述的事件发送才发送。
Conditions :
(1) A message buffer with the lowest priority is used for transmission.
一个最低优先级的消息缓冲用于传输
(2) The TxRqst bit was previously set to "1", but is set to "0" to abort transmission.
TXRqst被提前设置为1,但被设置为0去终止传输。
(3) The TxRqst bit is set to "1" again at the timing of (2).
TXRqst被在(2)中再次设置为1
Events :
- A valid message flows on the CAN bus.一个有效的消息出现在总线
- A transmission request is issued to another message buffer. 一个传输请求发到另一个消息缓冲
- CAN is initialized by the Init bit. CAN被在Init位设置时初始化。
下载附件
保存到相册
2012-7-7 20:40 上传
The IFx Arbitration Register (ID28-0 and Xtd bit), given by the application, defines the ID and the type of the outgoing message. ID号和扩展帧标准帧类型选择由应用程序给出,由它定义ID号和输出消息的类型
If the standard frame (11-bit ID) Is set, then ID28 to ID18 are used, and ID17 to ID0 are ignored. If the
extended frame (29-bit ID) is set, then ID28 to ID0 are used.
如果标准帧(11-bit ID)被设置,将使用到ID28 to ID18,ID17 to ID0不用,如果扩展帧(29-bit ID)被设置,ID28 to ID0 被使用。
If TxIE bit is set to "1", then the IntPnd bit is set to "1" after a successful transmission of the message
object.
如果TxIE位设置1,然后成功传送一个消息对象后IntPnd位设置1,
If the RmtEn bit is set to "1", the TxRqst bit is set to "1" after receiving the corresponding remote frame, and a data frame is sent automatically.
如果设置了RmtEn bit为1,远程帧接收到后会产生TxRqst bit为1,并自动发送一个数据帧。
[ 本帖最后由 damiaa 于 2012-7-8 10:40 编辑 ] |