Keil Logo

Peripheral Simulation

For Infineon C504-L — Timer 2

Simulation support for this peripheral or feature is comprised of:

  • Dialog boxes which display and allow you to change peripheral configuration.

These simulation capabilities are described below.

Timer/Counter 2 Dialog

Timer/Counter 2

The Keil Debugger simulates all aspects of Timer/Counter 2. The configuration is reflected in the Timer/Counter 2 Dialog that you may open from the Peripherals Menu. You may use the controls in the dialog to override the settings configured by your target program. This allows you to learn how the timer/counter works by interactively changing the configuration settings.

Timer/Counter 2

  • Mode settings select the size and auto-reload functions, and select either Timer or Counter operation for Timer 2.
  • T2CON (Timer Control Register) holds the run/stop and overflow flag for Timer 2.
  • T2MOD (Timer 2 Mode Register) holds the down count enable (DCEN) setting.
  • T2 (Timer/Counter 2) holds the value of Timer/Counter 2.
  • RC2 (Reload/Capture Timer 2) holds the 16-bit reload/capture register value.
  • TR2 (Timer 2 Run Control) is set to turn Timer 2 on, and reset to turn it off.
  • C/T2# (Counter/Timer Select) is set to configure Timer 2 as an external event counter, or reset to configure it as a timer.
  • CP/RL2# (Capture/Reload Select) is set for capture mode, and reset for reload mode. When either RCLK = 1 or TCLK = 1, this bit is ignored.
  • EXEN2 (Timer 2 External Enable) is set to capture or reload based on pin T2EX (P1.1). This bit is only meaningful if Timer 2 is being used to clock the serial port.
  • TCLK (Transmit Clock Enable) is set to use Timer 2 overflow pulses for the transmit clock.
  • RCLK (Receive Clock Enable) is set to use Timer 2 overflow pulses for the receive clock.
  • DCEN (Down Count Enable) is set to use Timer 2 as an up/down counter. The level of T2EX determines up or down counting.

I/O

  • T2EX (Timer 2 Capture/Reload Trigger) is an external input (P1.1/AN1/T2EX) for up/down counting or triggering a timer 2 reload.
  • T2 Pin is an external input pin for counter 2(P1.1/AN0/T2).

IRQ

  • TF2 (Timer 2 Overflow Flag) is set when a Timer 2 overflow occurs.
  • EXF2 (Timer 2 External Flag) is set when an external event on T2EX causes a capture or reload of Timer 2.
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.