Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Test

Application Signals and Messages

Below, we will show the use of CAN Signals and Messages using the 'Rx / Tx' example in can_demo.c.This demo will use multiple tasks to read, write, and update CAN Signals and Messages. This demo assumes that CAN Signals, Messages, and Bus configuration and initialization have already been done. This example completes the information provided in the previous sections.

To select the 'Rx / Tx' example make sure that the following is set in can_demo.c:

Code Block
languagecpp
linenumberstrue
                                                                 /* CAN Demo Definitions.                                */
#define  APP_CAN_RX_TX_DEMO                 0u
#define  APP_CAN_ECHO_DEMO                  1u
                                                                /* --------------- uC/CAN DEMO SELECTION -------------- */
                                                                /* Select the CAN demo to run.                          */
#define  APP_CAN_DEMO_SELECT                APP_CAN_RX_TX_DEMO

RxTask

 

The communication protocol uses in most cases only the CAN messages. The application is responsible for the values of the mapped CAN signals. The following source code completes the example, started in chapter 6.4 Defining CAN Signals and Messages:

...