C-CAN Transmit - Transmit CAN messages via C-CAN module on ST10 microcontrollers

Library

Target Support Package IC1/C166 Driver Library/C-CAN Interface

Description

The C-CAN Transmit block transmits a CAN message onto the CAN bus. Two modes of transmission are available with the C-CAN Transmit block.

The default transmit mode is to use a dedicated CAN buffer; in this case, messages to be transmitted are loaded directly into a CAN buffer that is used exclusively by the block. No queue is used, which means that in case the previous message has not been transmitted, it will be overwritten by the new one. This transmit mode does not use interrupts. An advantage of using the dedicated buffer mode is that there is reduced delay in transmitting high-priority messages, and reduced processor overhead that is otherwise required for queue management and servicing interrupts.

The other transmit mode is to use a First In First Out (FIFO) queue with dedicated buffer. In this mode, messages are placed in a queue and then transmitted on a first in, first out basis. This mode is useful if several messages, possibly with the same CAN identifier, must be transmitted in sequence; this may be a requirement if CAN is being used for data acquisition.

The C-CAN Transmit block should be connected to CAN Message Packing/Unpacking blocks. Do not ground the block or leave it unconnected.

Dialog Box

C-CAN Module

Select C-CAN module 1 or 2.. The C-CAN modules can receive messages independently.

Transmit mode

Select one of the two modes described above: direct transmission with dedicated buffer, or FIFO queue with dedicated buffer.

Length (number of messages) of FIFO queue

This option is available only if you select the transmit mode FIFO queue with dedicated buffer.

Buffer number

This parameter is for information only. It may be useful for reviewing code to know which hardware buffer is used for which block.

Sample time

Choose -1 to inherit the sample time from the driving blocks. The CAN Transmit block does not inherit constant sample times and runs at the base rate of the model if driven by invariant signals.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS