欢迎访问ic37.com |
会员登录 免费注册
发布采购

MCP2515-I/ST 参数 Datasheet PDF下载

MCP2515-I/ST图片预览
型号: MCP2515-I/ST
PDF下载: 下载PDF文件 查看货源
内容描述: 独立CAN控制器,SPI ™接口 [Stand-Alone CAN Controller With SPI⑩ Interface]
分类和应用: 控制器
文件页数/大小: 84 页 / 993 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号MCP2515-I/ST的Datasheet PDF文件第11页浏览型号MCP2515-I/ST的Datasheet PDF文件第12页浏览型号MCP2515-I/ST的Datasheet PDF文件第13页浏览型号MCP2515-I/ST的Datasheet PDF文件第14页浏览型号MCP2515-I/ST的Datasheet PDF文件第16页浏览型号MCP2515-I/ST的Datasheet PDF文件第17页浏览型号MCP2515-I/ST的Datasheet PDF文件第18页浏览型号MCP2515-I/ST的Datasheet PDF文件第19页  
MCP2515  
3.3  
Initiating Transmission  
3.0  
3.1  
MESSAGE TRANSMISSION  
Transmit Buffers  
In order to initiate message transmission, the  
TXBnCTRL.TXREQ bit must be set for each buffer to  
be transmitted. This can be accomplished by:  
The MCP2515 implements three transmit buffers. Each  
of these buffers occupies 14 bytes of SRAM and are  
mapped into the device memory map.  
• Writing to the register via the SPI write command  
• Sending the SPI RTS command  
The first byte, TXBnCTRL, is a control register  
associated with the message buffer. The information in  
this register determines the conditions under which the  
message will be transmitted and indicates the status of  
the message transmission (see Register 3-1).  
• Setting the TXnRTS pin low for the particular  
transmit buffer(s) that are to be transmitted  
If transmission is initiated via the SPI interface, the  
TXREQ bit can be set at the same time as the TXP  
priority bits.  
Five bytes are used to hold the standard and extended  
identifiers, as well as other message arbitration  
information (see Register 3-3 through Register 3-7).  
The last eight bytes are for the eight possible data  
bytes of the message to be transmitted (see  
Register 3-8).  
When TXBnCTRL.TXREQ is set, the TXBnCTRL.ABTF,  
TXBnCTRL.MLOA and TXBnCTRL.TXERR bits will be  
cleared automatically.  
Note:  
Setting the TXBnCTRL.TXREQ bit does  
not initiate a message transmission. It  
merely flags a message buffer as being  
ready for transmission. Transmission will  
start when the device detects that the bus  
is available.  
At a minimum, the TXBnSIDH, TXBnSIDL and  
TXBnDLC registers must be loaded. If data bytes are  
present in the message, the TXBnDm registers must  
also be loaded. If the message is to use extended  
identifiers, the TXBnEIDm registers must also be  
loaded and the TXBnSIDL.EXIDE bit set.  
Once the transmission has completed successfully, the  
TXBnCTRL.TXREQ bit will be cleared, the  
CANINTF.TXnIF bit will be set and an interrupt will be  
generated if the CANINTE.TXnIE bit is set.  
Prior to sending the message, the MCU must initialize  
the CANINTE.TXInE bit to enable or disable the  
generation of an interrupt when the message is sent.  
If  
the  
message  
transmission  
fails,  
the  
TXBnCTRL.TXREQ will remain set. This indicates that  
the message is still pending for transmission and one  
of the following condition flags will be set:  
Note:  
The TXBnCTRL.TXREQ bit must be clear  
(indicating the transmit buffer is not  
pending transmission) before writing to  
the transmit buffer.  
• If the message started to transmit but encoun-  
tered an error condition, the TXBnCTRL.TXERR  
and the CANINTF.MERRF bits will be set and an  
interrupt will be generated on the INT pin if the  
CANINTE.MERRE bit is set  
3.2  
Transmit Priority  
Transmit priority is a prioritization within the MCP2515  
of the pending transmittable messages. This is  
independent from, and not necessarily related to, any  
prioritization implicit in the message arbitration scheme  
built into the CAN protocol.  
• If the message is lost, arbitration at the  
TXBnCTRL.MLOA bit will be set  
Note:  
If  
One-shot  
mode  
is  
enabled  
(CANCTRL.OSM), the above conditions  
will still exist. However, the TXREQ bit will  
be cleared and the message will not  
attempt transmission a second time.  
Prior to sending the SOF, the priority of all buffers that  
are queued for transmission is compared. The transmit  
buffer with the highest priority will be sent first. For  
example, if transmit buffer 0 has a higher priority setting  
than transmit buffer 1, buffer 0 will be sent first.  
3.4  
One-Shot Mode  
If two buffers have the same priority setting, the buffer  
with the highest buffer number will be sent first. For  
example, if transmit buffer 1 has the same priority  
setting as transmit buffer 0, buffer 1 will be sent first.  
One-shot mode ensures that a message will only  
attempt to transmit one time. Normally, if a CAN  
message loses arbitration, or is destroyed by an error  
frame, the message is retransmitted. With One-shot  
mode enabled, a message will only attempt to transmit  
one time, regardless of arbitration loss or error frame.  
There are four levels of transmit priority. If  
TXBnCTRL.TXP<1:0> for a particular message buffer  
is set to 11, that buffer has the highest possible priority.  
If TXBnCTRL.TXP<1:0> for a particular message  
buffer is 00, that buffer has the lowest possible priority.  
One-shot mode is required to maintain time slots in  
deterministic systems, such as TTCAN.  
© 2005 Microchip Technology Inc.  
Preliminary  
DS21801D-page 15  
 复制成功!