Keil Logo

Peripheral Simulation

For Infineon C164CI — CAN1 Controller

Simulation support for this peripheral or feature is comprised of:

  • Dialog boxes which display and allow you to change peripheral configuration.
  • VTREGs (Virtual Target Registers) which support I/O with the peripheral.

These simulation capabilities are described below.

CAN1 Channels Dialog

CAN1 Channels

CAN1 Communication Dialog

CAN1 Communication

The Controller Area Network (CAN) Controller Communication tab displays the CAN communication activity on the CAN bus. The Message number, States, Message Identifier, Message Direction, Channel, Data Length and Data content are displayed for each message. To clear the message display, double-click anywhere in the message display area.

CAN1 Configuration Dialog

CAN1 Configuration

The CAN1 Configuration dialog shows the CAN Channel 1 configuration details.

CAN1Bx VTREG
Data Type: unsigned char

The CAN1Bx VTREGs contains the eight bytes of the CAN message. CAN1B0 is the first byte, CAN1B1 is the second byte, and so on.

  • When the simulated MCU transmits a CAN message, these VTREGs contain the message data bytes.
  • To simulate a received CAN message, these VTREGs must be initialized with the message data bytes.

CAN1ID VTREG
Data Type: unsigned long

The CAN1ID VTREG specifies the ID of the CAN message.

  • When the simulated MCU transmits a CAN message, this VTREG contains the message ID.
  • To simulate a received CAN message, this VTREG must be initialized with the message ID.

CAN1IN VTREG
Data Type: unsigned char

The CAN1IN VTREG specifies the type of CAN message the simulated MCU will receive. The values 1-4 are used:

  • 1: Message with 11-bit ID.
  • 2: Message with 29-bit ID.
  • 3: Message Request with 11-bit ID.
  • 4: Message Request with 29-bit ID.

For example:

CAN1IN=2;  // Input a 29-bit ID message

CAN1L VTREG
Data Type: unsigned char

The CAN1L VTREG specifies the length of the CAN message in bytes.

  • When the simulated MCU transmits a CAN message, this VTREG contains the number of bytes in the message.
  • To simulate a received CAN message, this VTREG must be initialized with the number of bytes in the message.

CAN1OUT VTREG
Data Type: unsigned char

The CAN1OUT VTREG specifies the type of CAN message that was transmitted by the simulated MCU. The values 1-4 are used:

  • 1: Message with 11-bit ID was sent.
  • 2: Message with 29-bit ID was sent.
  • 3: Message Request with 11-bit ID was sent.
  • 4: Message Request with 29-bit ID was sent.
Get more information about the
Peripheral Simulation Capabilities
of the µVision Debugger.
  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.