MCUXpresso SDK Documentation

canfd_interrupt_transfer

canfd_interrupt_transfer#

Overview#

The flexcan_interrupt example shows how to use FlexCAN driver in none-blocking interrupt way:

In this example, 2 boards are connected through CAN bus. Endpoint A(board A) send a CAN Message to Endpoint B(board B) when user press space key in terminal. Endpoint B receive the message, print the message content to terminal and echo back the message. Endpoint A will increase the received message and waiting for the next transmission of the user initiated.

For self wake up from STOP mode, since steps which MCU enters STOP mode differs on different MCUs, take flexcan_interrupt_transfer of twrke18f for example, user should do like this:

##include "fsl_smc.h"
...
...
flexcanConfig.enableSelfWakeup = true;
FLEXCAN_Init();
...
...
SMC_SetPowerModeStop(SMC, kSMC_PartialStop1);
if (wakenUp)
{
    PRINTF("B has been waken up!\r\n\r\n");
}
...
...

Supported Boards#

EVK9-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • two MIMX8ULP-EVK/EVK9 board

  • JLink Plus

  • 5V power supply

  • Personal Computer

Board settings

populate J8 for two boards. The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J8-1(CANH) node A, J8-1(CANH) node B

  • J8-2(CANL) node A, J8-2(CANL) node B

  • J8-3(GND) node A, J8-3(GND) node B

Prepare the Demo
  1. Connect 5V power supply and JLink Plus to the board, switch SW10 to power on the board

  2. Connect a micro USB cable between the host PC and the J17 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


MIMXRT1060-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKB board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN2 instance (J42) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

Consider special errata 005829 feature, the 1st valid MB should be used as reserved one.
The TX MB number will change from 8 to 9, while RX MB number will change from 9 to 10 
This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 10 used for Rx.
    Message buffer 9 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 24291
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 59183
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 10 used for Rx. Message buffer 9 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 16425 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 51370 Wait Node A to trigger the next transmission!


MIMXRT1170-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1170-EVKB board

  • Personal Computer

Board settings
  1. Remove J102 and J103 jumpers.

  2. The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN3 instance (J47) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 9 used for Rx.
    Message buffer 8 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 48411
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 46583
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 9 used for Rx. Message buffer 8 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 20174 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 18385 Wait Node A to trigger the next transmission!


MIMXRT1060-EVKC
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKC board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN2 instance (J42) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

Consider special errata 005829 feature, the 1st valid MB should be used as reserved one.
The TX MB number will change from 8 to 9, while RX MB number will change from 9 to 10 
This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 10 used for Rx.
    Message buffer 9 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 24291
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 59183
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 10 used for Rx. Message buffer 9 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 16425 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 51370 Wait Node A to trigger the next transmission!


EVK-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • two MIMX8ULP-EVK/EVK9 board

  • JLink Plus

  • 5V power supply

  • Personal Computer

Board settings

populate J8 for two boards. The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J8-1(CANH) node A, J8-1(CANH) node B

  • J8-2(CANL) node A, J8-2(CANL) node B

  • J8-3(GND) node A, J8-3(GND) node B

Prepare the Demo
  1. Connect 5V power supply and JLink Plus to the board, switch SW10 to power on the board

  2. Connect a micro USB cable between the host PC and the J17 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


FRDM-IMXRT1152
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1152 board

  • Personal Computer

Board settings
  1. The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN2 instance (J60) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 9 used for Rx.
    Message buffer 8 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 48411
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 46583
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 9 used for Rx. Message buffer 8 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 20174 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 18385 Wait Node A to trigger the next transmission!


MIMXRT1040-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1040-EVK board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN3 instance (J42) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

Consider special errata 005829 feature, the 1st valid MB should be used as reserved one.
The TX MB number will change from 8 to 9, while RX MB number will change from 9 to 10 
This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 10 used for Rx.
    Message buffer 9 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 24291
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 59183
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 10 used for Rx. Message buffer 9 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 16425 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 51370 Wait Node A to trigger the next transmission!


EVK-MIMXRT1064
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1064 board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN2 instance (J11) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

Consider special errata 005829 feature, the 1st valid MB should be used as reserved one.
The TX MB number will change from 8 to 9, while RX MB number will change from 9 to 10 
This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 10 used for Rx.
    Message buffer 9 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 24291
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 59183
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 10 used for Rx. Message buffer 9 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 16425 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 51370 Wait Node A to trigger the next transmission!


MIMXRT1160-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1160-EVK board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN3 instance (J47) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 9 used for Rx.
    Message buffer 8 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 48411
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 46583
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 9 used for Rx. Message buffer 8 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 20174 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 18385 Wait Node A to trigger the next transmission!


MIMXRT1180-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1180-EVK board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN3 instance (J35) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 9 used for Rx.
    Message buffer 8 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 48411
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 46583
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 9 used for Rx. Message buffer 8 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 20174 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 18385 Wait Node A to trigger the next transmission!


IMX95LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • two IMX95LPD5-EVK board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J17-2(CANH) node A, J17-2(CANH) node B

  • J17-3(CANL) node A, J17-3(CANL) node B

  • J17-4(GND) node A, J7-4(GND) node B

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


FRDM-IMX95
Hardware requirements
  • Micro USB cable

  • two FRDM-IMX95 board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J2-8(CANH) node A, J2-8(CANH) node B

  • J2-10(CANL) node A, J2-10(CANL) node B

  • J2-6(GND) node A, J2-6(GND) node B

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


FRDM-IMX937
Hardware requirements
  • Micro USB cable

  • two FRDM-IMX937 board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J2-8(CANH) node A, J2-8(CANH) node B

  • J2-10(CANL) node A, J2-10(CANL) node B

  • J2-6(GND) node A, J2-6(GND) node B

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


MCIMX93AUTO-EVK
Hardware requirements
  • USB Type-C cable

  • two MCIMX93AUTO-EVK board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J21-1(CAN2_H) node A, J21-1(CAN2_H) node B

  • J21-2(CAN2_L) node A, J21-2(CAN2_L) node B

  • J21-3(GND) node A, J21-3(GND) node B

Note

Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW2 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J26 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


MCIMX93-EVK
Hardware requirements
  • USB Type-C cable

  • two MCIMX93-EVK board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

Switch S1101 to “ON” for two boards. The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J1101-2(CANH) node A, J1101-2(CANH) node B

  • J1101-3(CANL) node A, J1101-3(CANL) node B

  • J1005-7(GND) node A, J1005-7(GND) node B

Note

Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW301 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J1401 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


MCIMX93W-EVK
Hardware requirements
  • USB Type-C cable

  • two MCIMX93W-EVK board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

Switch S1101 to “ON” for two boards. The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J1101-2(CANH) node A, J1101-2(CANH) node B

  • J1101-3(CANL) node A, J1101-3(CANL) node B

  • J1005-7(GND) node A, J1005-7(GND) node B

Note

Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW301 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J1401 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


MCIMX93-QSB
Hardware requirements
  • USB Type-C cable

  • two MCIMX93-QSB board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

Switch S1501 to “ON” for two boards. The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J1501-2(CANH) node A, J1501-2(CANH) node B

  • J1501-3(CANL) node A, J1501-3(CANL) node B

  • J1406-7(GND) node A, J1406-7(GND) node B

Note

Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW301 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J1708 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!


FRDM-MCXE247
Hardware requirements
  • USB-C cable

  • FRDM-MCXE247 board

  • Personal Computer

Board settings

The example requires 2 boards.

Board to board connections needed to be as follows:

        Node A           connect to      Node B
Pin Name   Board Location         Pin Name    Board Location
CANH       J17-1                  CANH        J17-1
CANL       J17-2                  CANL        J17-2
GND        J17-4                  GND         J17-4
Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 1 used for Rx.
    Message buffer 0 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 24291
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 59183
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 1 used for Rx. Message buffer 0 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 16425 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 51370 Wait Node A to trigger the next transmission!


FRDM-IMXRT1186
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1186 board

  • Personal Computer

Board settings

The example requires 2 sets of boards, each of them are mounted with the base board. Using a male to male CAN cable to connect the CAN1 instance (J22) between the 2 base boards.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

After connecting the two boards, these instructions display on each terminal window. One board must be chosen as node A and the other board as node B. (Note: Node B should start first) Data is sent continuously between the node A and the node B.

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********
    Message format: Standard (11 bit id)
    Message buffer 9 used for Rx.
    Message buffer 8 used for Tx.
    Interrupt Mode: Enabled
    Operation Mode: TX and RX --> Normal
*********************************************

Please select local node as A or B:
Note: Node B should start first.
Node:A
Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 48411
Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 46583
Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE ********* Message format: Standard (11 bit id) Message buffer 9 used for Rx. Message buffer 8 used for Tx. Interrupt Mode: Enabled Operation Mode: TX and RX –> Normal


Please select local node as A or B: Note: Node B should start first. Node:B Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 20174 Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 18385 Wait Node A to trigger the next transmission!


IMX952-EVK
Hardware requirements
  • Micro USB cable

  • two IMX952-EVK board

  • JLink Plus

  • 12V~20V power supply

  • Personal Computer

Board settings

The example requires connecting between CAN pins of two boards. The connection should be set as follows:

Between two boards:

  • J17-2(CANH) node A, J17-2(CANH) node B

  • J17-3(CANL) node A, J17-3(CANL) node B

  • J17-4(GND) node A, J7-4(GND) node B

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Either re-power up your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, following information can be seen on the terminal:

This message displays on the node A terminal:

********* FLEXCAN Interrupt EXAMPLE *********

    Message format: Standard (11 bit id)

    Message buffer 9 used for Rx.

    Message buffer 8 used for Tx.

    Interrupt Mode: Enabled

    Operation Mode: TX and RX --> Normal

*********************************************

Please select local node as A or B:

Note: Node B should start first.

Node:a

Press any key to trigger one-shot transmission

Rx MB ID: 0x123, Rx MB data: 0x0, Time stamp: 8877

Press any key to trigger the next transmission!

Rx MB ID: 0x123, Rx MB data: 0x1, Time stamp: 32459

Press any key to trigger the next transmission!

This message displays on the node B terminal:

********* FLEXCAN Interrupt EXAMPLE *********

Message format: Standard (11 bit id)

Message buffer 9 used for Rx.

Message buffer 8 used for Tx.

Interrupt Mode: Enabled

Operation Mode: TX and RX --> Normal

Please select local node as A or B:

Note: Node B should start first.

Node:b

Start to Wait data from Node A

Rx MB ID: 0x321, Rx MB data: 0x0, Time stamp: 5759

Wait Node A to trigger the next transmission!

Rx MB ID: 0x321, Rx MB data: 0x1, Time stamp: 57276

Wait Node A to trigger the next transmission!