Documentation

Softing CAN-AC2-104 with SJA1000 Setup

Softing CAN-AC2-104 with SJA1000 Setup block

Library

Simulink® Real-Time™ Library for CAN

Description

The Setup block defines general settings of the stacked CAN boards. The CAN driver blocks for this board support up to three boards for each target system, making up to six CAN ports available. For each board in the target system, you must use exactly one Setup driver block.

Block Parameters

Board

Defines the board being accessed by this driver block instance. If multiple boards are present in the target computer, you can use the board number (1...3) to differentiate the boards. The physical board referenced by the board number depends on the PCI Slot parameter. If just one board is present in the target system, select board number 1. The physical board referenced by the board number depends on the I/O base address parameter.

CAN 1 - baud rate

Defines the most common baud rates for CAN port 1. If your model requires a special baud rate, select the value User defined. In this case, use the CAN 1 - user defined baud rate parameter to provide the four values for the timing information. The vector elements have the following meanings:

[ Prescaler, Synchronization-Jump-Width, Time-Segment-1, 
Time-Segment-2 ]

For more information about these values, see the Softing® user manual for this board.

CAN 1 - user defined baud rate

See CAN 1- baud rate.

CAN 2 - baud rate

Defines the most common baud rates for CAN port 2. If your model requires a special baud rate, select the value User defined. In this case, use the CAN 2 - user defined baud rate parameter to provide the four values for the timing information. The vector elements have the following meanings:

[ Prescaler, Synchronization-Jump-Width, Time-Segment-1, 
Time-Segment-2 ]

For more information about these values, see the Softing user manual for this board.

CAN 2 - user defined baud rate

See CAN 2 - baud rate.

Initialization command structure and Termination

Define CAN messages sent during initialization and termination of the Setup block.

Show bus-off status output

Select this check box to enable the bus-off status output port. The output signal can be 1 (bus-off state); otherwise, it is 0. If the bus-off status persists, the block optionally initiates recovery, depending on the setting of Bus-off recovery.

Clear this check box to disable the output port.

Bus-off recovery

Use this parameter to specify how the model is to perform bus-off recovery for the CAN network.

From the list, select:

  • Off

    Does not perform bus-off recovery.

  • Auto

    Upon detection, the model waits 1 second to see if the bus-off state persists. After 1 second, bus-off recovery occurs.

  • Manual Trigger Input

    Enables you to input a signal when you want bus-off recovery to occur. Selecting this option creates an input port for the Setup block.

Termination

Define CAN messages sent during termination of the Setup block.

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 4 bytes of I/O address space. It is mainly used to transfer the memory base address the board should use. See the Softing user manual for this board to set the I/O base address. The I/O base address entered in this control must 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 must 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 (the board does not have a corresponding DIP switch). The memory address range is 4 KB.

If more than one board is present in the target system, a different memory base address must be entered for each board. You must make sure that the defined address ranges do not overlap.

The Softing CAN-AC2-104 driver can address a memory map in the memory range C8000 - F7FFF. However, the Simulink Real-Time software only reserves memory-mapped space in the address range C0000 - DBFFF. Therefore, you must address the Softing CAN-AC2-104 in the range

C8000 - DBFFF

The board allows you to terminate each of the two CAN ports separately by means of jumpers found on the board. Refer to the board user manual for how the DIP switches must be set. Both CAN ports must be terminated when you use the loopback model provided to test the board and drivers.

Interrupt line

Selects an interrupt line from the list.

Was this topic helpful?