Keil Logo

Virtual Simulation Registers (VTREG)

The µVision3 Debugger implements virtual simulation registers (VTREG) that can be used to review the CAN communication on the Debugger command line level or within Debug and Signal functions. The following registers are implemented:

VTREG Description
CANxID Is an 11-bit or 29-bit identifier of the message currently transferred. The ID size is specified with the values in the CAN0IN or CAN0OUT VTREG. For short 11-bit identifiers only the 11 LSB bits are used of this VTREG.
CANxL The data length of the CAN message. Valid values for CAN0L are 0...8.
CANxBO ...CANxB7 The data bytes of the CAN message. 8 data bytes are implemented to access the individual message bytes of the current object.
CANxIN Is set by the user or within debug functions to simulate incoming messages. The following values are possible:
  • CANxIN = 1 receive the current message using a 11-bit identifier.
  • CANxIN = 2 receive the current message using a 29-bit identifier.
  • CANxIN = 3 request a remote frame from the application program with matching 11-bit identifier.
  • CANxIN = 4 request a remote frame from the application program with matching 29-bit identifier.
  • CANxIN = 0xFF simulate BUSOFF mode of the CAN controller.CANxIN is set to 0 by the simulator when the message has be processed by the µVision3 simulator.
CANxOUT Is set by the simulator when transmitting a message by the application program. The following values are possible:
  • CANxOUT = 1 transmit the current message using a 11-bit identifier.
  • CANxOUT = 2 transmit the current message using a 29-bit identifier.
  • CANxOUT = 3 request a remote frame with matching 11-bit identifier from the user or debug function.
  • CANxOUT = 4 request a remote frame with matching 29-bit identifier from the user or debug function.
CANxTIMING Allows you to set a performance factor that controls the simulated communication timing within µVision3. This performance factor simulates a busy CAN network. With a performance factor of 0 an CAN network with infinite baudrate is simulated. With a factor of 1 the CAN messages are transferred in real-time taking care of the current selected communication baudrate. A factor of 2 simulates the performance that is identical to 50% of the communication baudrate. CANxTIMING is a floating point value that can be between 0 .. 1000.

The VTREG naming conventions CANx vary from device to device. Several devices provide more than on CAN interface and therefore the VTREG names may be prefixed with CAN0 or CAN1. You may use the command DIR VTREG to check the virtual simulation register names of the CAN device you have selected.

The virtual simulation registers (VTREG) can be used with Debug Functions to generate scripts for:

  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.