Keil™, An ARM® Company

RTX51 Tiny User's Guide

Hardware Timer

The following EQUates specify how the RTX51 Tiny hardware timer is configured.

  • INT_REGBANK specifies the register bank used by the RTX51 Tiny Timer Interrupt. The default setting is 1 (for register bank 1).
  • INT_CLOCK specifies the number of cycles before the timer generates an interrupt. This number may be a value from 1000-65535. Small numbers generate faster interrupts. This number is used to calculate the reload value for the timer (65536-INT_CLOCK). The default setting is 10000.
  • HW_TIMER_CODE is a macro that instructs code to execute at the end of the RTX51 Tiny Timer Tick Interrupt. The default setting for this macro is to return from the interrupt (RETI). For example:
    HW_TIMER_CODE MACRO ; Empty Macro by default
    RETI
    ENDM