xPC Target | ![]() ![]() |
The Setup driver block is used to define general settings of the plugged-in CAN board(s). The CAN driver blocks for this board support up to three boards for each target system what leads to the availability of up to six CAN ports. For each board in the target system exactly one Setup block has to be used in a model. The dialog box of the Setup block lets you define the following settings.
Board -- Define which board is being accessed by this driver block instance. If multiple boards are present in the target system, the board number (1, 2 or3) can be seen as a reference identifier in order to differentiate the boards. The physical board finally referenced by the board number depends on the PCI Slot edit field described further below. If just one board is present in the target system, board number 1 should be selected.
CAN 1 - Baudrate -- Defines the most common baud rates for CAN port 1. If special timing is necessary (baud rate), you can select User defined
.
CAN 1 - User defined Baudrate -- If you selected User defined
from the CAN 1 - Baud rate list, enter four values for the timing information. The vector elements have the following meaning
For more information about these values see the Softing user manual for this board.
CAN 1 - Acceptance -- Defines the acceptance filters for CAN port 1. Because the receive FIFO gets filled with any CAN messages going over the bus, the use of the CAN controller acceptance filters becomes important in order to filter out unwanted messages already at the controller level. This acceptance filter information is provided by a row vector with 4 elements, where the first two are used to define the acceptance mask and acceptance code for Standard identifiers and the latter two for Extended identifiers. The default value defined by the Setup block doesn't filter out any messages. For information how to define the acceptance information in order to filter certain messages, see See "Acceptance Filters.
CAN 2 - Baudrate -- Defines the most common baud rates for CAN port 2. If special timing is necessary (baud rate), You can select User defined
.
CAN 2- User defined Baudrate -- If you selected User defined
from the CAN 1 - Baud rate list, enter four values for the timing information. The vector elements have the following meaning
For more information about these values see the Softing user manual for this board.
CAN 2 Acceptance -- Defines the acceptance filters for CAN port 2. Because the receive FIFO gets filled with any CAN messages going over the bus, the use of the CAN controller acceptance filters becomes important in order to filter out unwanted messages already at the controller level. This acceptance filter information is provided by a row vector with 4 elements, where the first two are used to define the acceptance mask and acceptance code for Standard identifiers and the latter two for Extended identifiers. The default value defined by the Setup block doesn't filter out any messages. For information how to define the acceptance information in order to filter certain messages, see Acceptance Filters.
Enable error frame detection -- Defines if the CAN controller should detect Error frames and forward these to the Receive FIFO. Checking this box makes sense for monitoring applications where you want to be informed about all events going over the bus. For low latency time applications, checking this box may increase the FIFO Read driver block latency because the receive FIFO gets filled with additional events.
Initialization (struct) and Termination (struct) -- Define CAN messages sent during initialization and termination of the Setup block. For more information, see CAN I/O Support.
I/O Base address -- Defines the I/O base address of the board to be accessed by this block instance. The I/O base address is given by the DIP-switch setting on the board itself. The I/O address range is 3 bytes and is mainly used to transfer the information which memory base address the board should use. See the Softing user manual for this board on how the I/O base address can be set. The I/O base address entered in this control has to correspond with the DIP-switch setting on the board. If more than one board is present in the target system a different I/O base address has to be entered for each board. In this case the I/O base address itself defines which board is referenced by which board number.
Memory base address -- Defines the memory base address of the board to be accessed by this block instance. The memory base address is a software setting only (no corresponding DIP-switch is found on the board). The memory address range is 64k bytes. If more than one board is present in the target system a different memory base address has to be entered for each board and you have to make sure that the defined address ranges do not overlap. Because the xPC Target kernel only reserves a subset of the address range between 640k bytes and 1M bytes for memory mapped devices the address ranges have to lie within the following range:
The board allows activating proper termination for each of the two CAN ports separately by means of DIP-switches at the rear panel of the board. Refer to the Softing user manual on how the DIP-switches have to be set. Both CAN ports have to be terminated properly where you use the provided loop-back model in order to test the board and drivers.
![]() | CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN-Controller | FIFO Write Driver Block | ![]() |