Keil Logo

Simulation

The µVision Debugger can simulate the behavior of the target application. This enables developers to test applications prior to having the hardware.

The logic behavior of communication peripherals is reflected through virtual registers that can be listed with the command DIR VTREG. Thus, debug functions that stimulate complex peripherals can be written easily. The µVision Simulator mimes the timing and logical behavior of serial communication protocols like UART, I²C, SPI, and CAN, but does not simulate the I/O port toggling of the physical communication pins on the I/O port.

The chapter contains several signal function temples for simulating:

  • Digital Input describes the simulation of digital I/O ports. Examples are provided for interrupt signals and impulse patterns.
  • Analog Input describes the simulation of A/D and D/A converters. Examples exist for various analog signal functions.
  • UART Communication describes the UART simulation via VTREGs and their control via peripheral dialogs or through signal functions.
  • CAN Communication explains a typical setup to test a CAN communication bus. Links are provided to configuration dialogs.
  • I²C Communication describes the concept, simulation, and bus modes. Application examples, simulation of I²C devices, and debugging possibilities are included.
  • SPI Communication explains how to debug and use SPIs with µVision. A code examples simulates a simple state machine using switches.
  • PPAGE VTREG allows you to specify the PDATA page, or the SFR register that contains the PDATA page on 8051 devices.
  • XPAGE VTREG allows you to specify the XDATA page, or the SFR register that contains the XDATA page on 8051 devices.

Related Knowledgebase Articles

  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.