Example Summary

This example demonstrates using the CAN driver to communicate with another SimpleLink™ device. To run this example successfully, another SimpleLink™ device running the canInitiator example is required.

Peripherals & Pin Assignments

When this project is built, the SysConfig tool will generate the TI-Driver configurations into the ti_drivers_config.c and ti_drivers_config.h files. Information on pins and resources used is present in both generated files. Additionally, the System Configuration file (*.syscfg) present in the project may be opened with SysConfig’s graphical user interface to determine pins and resources used.

BoosterPacks, Board Resources & Jumper Settings

This example requires two LaunchPads with an integrated CAN controller and two external CAN transceiver boards to communicate on the CAN bus.

The transceiver should be connected to the LaunchPad as follows:

LaunchPad Pin CAN Transceiver Pin
BP.31 (DIO18) RXD
BP.32 (DIO17) TXD

Initialization and configuration of the CAN transceiver is not handled by this example and must be performed independently.

Before running the example, the CANL and CANH bus signals should be connected between the canInitiator and canResponder transceivers with the appropriate CAN bus termination.

For board specific jumper settings, resources and BoosterPack modifications, refer to the Board.html file.

If you’re using an IDE such as Code Composer Studio (CCS) or IAR, please refer to Board.html in your project directory for resources used and board-specific jumper settings.

The Board.html can also be found in your SDK installation:

<SDK_INSTALL_DIR>/source/ti/boards/<BOARD>

Example Usage

The connection should have the following settings:

    Baud-rate:  115200
    Data bits:       8
    Stop bits:       1
    Parity:       None
    Flow Control: None

Sample UART output after pressing BTN-1 on the canInitiator LaunchPad:

    CAN Responder ready. Waiting for CAN messages...

    RxMsg Cnt: 1, RxEvt Cnt: 1
    Msg ID: 0x12345678
    TS: 0xd176
    CAN FD: 1
    DLC: 15
    BRS: 1
    ESI: 0
    Data[64]: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15
    16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E
    2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F

    > Response sent.

Sample UART output after pressing BTN-2 on the canInitiator LaunchPad:

    RxMsg Cnt: 2, RxEvt Cnt: 2
    Msg ID: 0x5aa
    TS: 0x2e0b
    CAN FD: 0
    DLC: 8
    BRS: 0
    ESI: 0
    Data[8]: 00 01 02 03 04 05 06 07

    > Response sent.

Application Design Details

FreeRTOS: