Keil Logo

Simulation

You can test the programs you create with the Real-Time Library CAN driver (RL-CAN) using the simulation capabilities of the µVision® IDE. Simulation allows you to test your CAN application before the target hardware is ready.

Follow these steps to test an RL-CAN example application using the µVision Simulator.

  1. Copy one of the examples (\KEIL\ARM\Boards\Keil\MCBSTR730\RL\CAN\CAN_Ex1 or \KEIL\ARM\Boards\Keil\MCBSTR730\RL\CAN\CAN_Ex2) to a new folder.
  2. Select and load the project file (CAN_Ex1.UV2 or CAN_Ex2.UV2) into µVision. This file is located in the folder copied in step 1. In µVision, use Project — Open Project...

    Open Project Menu

    Select Project File
  3. Select the target Simulator.

    Simulator
  4. Click on Debug — Start/Stop Debug Session on the menu bar or click the toolbar button to run the simulation.

    Debug Menu
  5. New windows appear as shown below. These windows show the device peripheral functionality.

    Multiple debug windows
  6. Click on Debug — Run to start the simulation.

    Debug menu
  7. The communication messages display in the CAN 0 Communication and CAN 1 Communication windows.

    CAN Communication Window

    CAN Communication Window
  8. Click on the Analog sweep 0 .. 4.5V button, on the Toolbox window, to start the analog value rising from 0 V to 4.5 V and lowering from 4.5 V to 0 V. You can stop the analog value change by clicking on Analog sweep STOP.

    Analog Inputs Dialog
  9. Stop the simulation before exiting µVision by clicking on Debug — Stop on the Debug menu.

    Debug Menu
  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.