MotoHawk CAN Over SPI Definition

This MotoHawk™ block allows inter CPU communications that utilize a Serial Peripheral Interface (SPI) to emulate aspects of MotoHawk's CAN behavior. The communication is not CAN, but it behaves like CAN and thus has many of the same attributes and could be used to emulate a CAN protocol on a peer to peer SPI bus.

Block ID

CAN Over SPI Defn

Library

motohawk_SPI_lib

Description

This MotoHawk™ block allows inter CPU communications that utilize a Serial Peripheral Interface (SPI) to emulate aspects of MotoHawk's CAN behavior. The communication is not CAN, but it behaves like CAN and thus has many of the same attributes and could be used to emulate a CAN protocol on a peer to peer SPI bus.

One key difference between CAN and this block set relates to message size. Message size is fixed at design time, but the payload is not restricted to 8 bytes like it is in CAN. The developer has the option to specify larger payloads.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single quote enclosed Unique C-legal name (no special characters like spaces or commas) for this definition. Other blocks will reference this definition via this name.
Resource Drop Down The list of resources that support the CAN Over SPI behavior for the selected target
Message Byte Size Unsigned integer greater than zero Specifies the number of data bytes in a message. CAN is fixed at 8, but this behavior is CAN like and as such can support non-standard message sizes. CAN Over SPI messages are of a fixed size so all messages will include this many bytes, even when an actual message is specified to contain fewer bytes (just like CAN). An even number of bytes is most efficient for SPI transfer.
Transmit Queue Size Unsigned integer greater than zero Defines to what depth requests to send data over the SPI link shall be queued before the request will be discarded. The TX overrun count status will capture how many messages have been discarded because of insufficient queue depth and Max TX queue depth will allow queue utilization to be examined.
Receive Queue Size Unsigned integer greater than zero Defines to what depth received messages will be queued before they are discarded. The RX overrun count status will capture how many messages have been discarded because of insufficient queue depth and Max RX queue depth will allow queue utilization to be examined.