Keil Logo

Peripheral Simulation

For Infineon C515A-L — Watchdog Timer

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.

Watchdog Timer Dialog

Watchdog Timer

The Watchdog Timer dialog shows the current state of the on-chip Watchdog Timer. You can change watchdog settings using the controls in this dialog.

Watchdog Timer

  • Timer holds the Watchdog Timer value.
  • WDTS (Watchdog Timer Status Flag) is set by hardware when a Watchdog Timer reset occurs.
  • WDTREL (Watchdog Timer Reload Register) holds the refresh value for the Watchdog Timer.
  • WDTPSEL (Watchdog Timer Prescaler Select) is set to divide the Watchdog Timer clock by 16.
  • WDT (Watchdog Timer Refresh Flag) is set to refresh the Watchdog Timer. To perform a refresh, you must set this flag immediately before setting the Watchdog Timer Start Flag (SWDT).
  • SWDT (Watchdog Timer Start Flag) is set to activate the Watchdog Timer. Setting this bit directly after setting the Refresh Flag (WDT) refreshes the Watchdog Timer.
  • PE_SWD (Start Watchdog Timer) if set during a hardware reset, this bit starts the Watchdog Timer. Setting this bit during normal program execution does not start the Watchdog Timer.

PE_SWD VTREG
Data Type: unsigned char

The PE_SWD VTREG allows you to simulate the behavior of the PE/SWD pin on the simulated MCU. When this pin is set to a high level at reset, the watchdog timer is enabled. When this pin is set to a low lever, the watchdog is disabled. By default, PE_SWD is set to 1 to simulate the on-chip pull-up resistor. This enabled the watchdog timer. To disable the watchdog timer, you must set PE_SWD to 0 and reset the simulated MCU. For example:

  1. Create a debugger INI file containing the following commands:
    PE_SWD = 0  /* Disable Watchdog with pin PE_SWD */
    reset       /* Reset the MCU and use value at PE_SWD */
    g, main     /* Run target program until main function */
    
  2. Under Options for Target - Debug - Use Simulator, disable the option "Go till main ()" then enter the filename for the debugger INI file you created.
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.