EmbeddedRelated.com
Forums

CAN interface to Rabbit RCM3700 via SPI

Started by mike_e_blake65 December 31, 2004

Is anybody interested in helping with this project. Contact me at
mike@mike....

This project will interface the Microchip MCP2515 CAN Controller to
a Rabbit (ZWorld) RCM3700 core microprocessor via serial SPI
(http://www.rabbitsemiconductor.com/products/rcm3700/) . Ports C, D
and E will be used with the capability of simultaneous reads/writes
from each port which is connected to a MCP2515
(http://ww1.microchip.com/downloads/en/DeviceDoc/21801c.pdf) .

The objective is to provide the capability of using the MCP2515 CAN
Controller with the Rabbit RCM3700 with a simple interface for the
user program. This user program will use the Rabbit functions
provided to Read and Write from each of the CAN Controllers attached
to the SPI ports. All message blocking and parsing will be done at
the user level and will not be the responsibility of this project.

The Rabbit code will perform for the following operations, as called
from a user application,

RESET Resets internal registers of the MCP2515 to default
state
READ Read data (buffer) from Port x (Returns the Message Type,
Identifier, DLC, and Data Field)
WRITE Write data (buffer) to Port x, with parameter for message
type of Standard, extended and remote Handles RTS (Message
Request to Send) functions. Buffer will consist of the Transmit
Priority (0, 1, 2, 3 TXBnCTRL.TXP), Message Type, Identifier,
DLC
and Data Field.
ABORT - Abort Message Transmission

STATUS FLAG An error code will be set for each write to the CAN
Controller. These codes are follows;
0 = Sucessful completion of Write
1 = Message encountered an error condition during
transmission (TXBnCTRL.TXERR)
2 = Message lost arbitration (TXBnCTRL.MLOA)

Deliverables will be, basic electrical schematic of the interface
between ports C, D and E and the respective MCP2515's via SPI,
and
the source code for the RCM3700 as defined above, along with the
documentation of the interface Rabbit Source Code routines.