TwinCAN Transmit

Transmit CAN messages from TwinCAN module on XC16x variants of Infineon® C166® microcontrollers

Library

Target Support Package IC1/C166 Driver Library/ TwinCAN Interface

Description

The TwinCAN Transmit block transmits a CAN message onto the CAN bus. Two modes of transmission are available with the CAN Transmit block, as described below.

The first 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 minimal delay in transmitting high-priority messages.

The second 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 TwinCAN Transmit block should be connected to CAN Message Packing/Unpacking blocks. Do not ground the block or leave it unconnected.

Dialog Box

TwinCAN Node

Select node A or node B.

Transmit mode

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

Buffer selection

Choose either automatic or manual selection of the hardware buffer number.

Buffer number [0..31]

This option is available only if the buffer selection is available and set to manual. You must select a buffer number between 0 and 31. Note if more than one message is ready to be transmitted, then the one in the lower buffer number will be sent first. Select buffer numbers such that the higher the message priority, the lower the buffer number. Note that the hardware buffers are shared between node A and node B of the TwinCAN module.

Sample time

Choose -1 to inherit the sample time from the driving blocks. The TwinCAN 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