Keil Logo

TwinCAN

The TwinCAN example project is a demonstration of the XC167's CANBus.

The TwinCAN example project demonstrates assembling, compiling, linking, downloading, and debugging using the µVision IDE on the MCBXC167 board.

The TwinCAN project has three available targets:

  • MCB-XC167: Target A.
  • MCB-XC167: Target B. Target A and Target B may be downloaded to two (2) different boards that communicate through CAN.
  • Simulator: The Simulator target is setup with a Simulation Script that generates the Target B messages while the Target A configuration runs in the simulator.

Loading TwinCAN

To load the TwinCAN project, select Open Project from the Project menu and open CAN.C from the following folder:

  • …\C166\BOARDS\KEIL MCB-XC167\TwinCAN

Open TwinCAN Project Dialog

Project WorkspaceWhen the TwinCAN project opens, the µVision Project Workspace window displays the source files that make up the project.

  • Start_V2.A66: CPU startup file for the Infineon XC167 devices.
  • MAIN.C: the application module that prints the message.
  • CAN.C: the application module for the CAN. CAN Port Pin P4.5 is used for CAN interface input and Pin 4.6 is used for CAN interface output.

The ABSTRACT.TXT file contains documentation about the project.

Editing TwinCAN

You may edit CAN.C or review the source code. Double click on CAN.C in the Files page of the Project Window. µVision loads and displays the contents in an editor window.

Running TwinCAN

Perform the following four steps to run the TwinCAN Example on the MCBXC167 Evaluation Board:

  1. Building TwinCAN
  2. Downloading TwinCAN
  3. Debugging TwinCAN
  4. Checking Output
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.