Showing changes from revision #1 to #2:
Added | Removed | Changed
The HAL must supply at least one timer capable of generating periodic interrupts. Each timer should generate a separate logical interrupt, and the interrupt must be latched (either in the timer, the main interrupt controller, or both).
interrupts. Each timer should generate a separate logical interrupt, and the
interrupt must be latched. The timers must either be variable rate (period is
a multiple of a basic granularity), or be fixed rate (period = 1*granularity).
Optionally, the timer should be capable of reporting the time until the
next interrupt, in units of the granularity.
N
, its interrupt rate will be granularity/N
Hz.The HAL API does not allow or expect the granularity of a timer to change while the system is running – if multiple clock sources are available then the HAL must pick a suitable clock source on startup and stick to it.
The timers must either be variable rate (period is a multiple of a basic granularity), or be fixed rate (period is fixed at 1). Optionally, the timer should be capable of reporting the time until the next interrupt, in units of the granularity (HAL_TimerReadCountdown).
RISC OS expects timer 0 to be capable of generating interrupts at a rate of 100Hz (preferably with the ability to fine-tune the value, so that the RTC module can smoothly adjust the real-time clock). It’s recommended that timers have granularities of at least 1MHz or greater, so that they can be used for timing events at much greater precision than the 100Hz RISC OS system timer allows for.