CAN Receive
Purpose
Receive CAN messages
Library
STM32
Description
The block initiates the reception of CAN messages with a given identifier (ID) on the given CAN interface. On reception of a CAN message the data is made available on the block output d as a vectorized signal of the provided frame length. The output v is 1 for one simulation step when new data is received, 0 otherwise.
Parameters
- CAN interface
Selects the CAN interface to use. The selected CAN interface must be configured using a CAN Port block.
- CAN ID source
Selects whether the CAN ID is specified as a parameter or is supplied as an input signal.
- CAN ID
The ID for which the block receives CAN messages. The CAN ID can be supplied as either 11-bit value(s) (for CAN 2.0A) or a 29-bit value(s) (for CAN 2.0B).
- Frame format
Specifies the frame format that is used when filtering for matching CAN messages. Possible values are:
Standard CAN for CAN 2.0A messages with an 11-bit ID. The standard 11-bit ID provides for \(\mathrm{2^{11}}\), or \(2048\) different message identifiers.
Extended CAN for CAN 2.0B messages with an 29-bit ID. The extended 29-bit ID provides for \(\mathrm{2^{29}}\), or \(537\) million identifiers.
Auto uses the Standard format if the specified CAN ID is smaller than \(2047\). Otherwise, the Extended format is used.
- Frame length
Specifies the frame length of the CAN message in bytes.
- Offline simulation
Enables or disables data inspection in an offline simulation. If set to enable, terminals are added to the subsystem in the top-level schematic. If set to disable, no such terminals are added to the subsystem.