Timer Compare Driver
Program the SoC timer compare register relative to the current counter.
Task
Define TIMER_COUNTER at base+0x0 and TIMER_COMPARE at base+0x4. Implement timer_schedule(delta) by reading counter and writing counter+delta.
Examples
- Implement the required behavior and preserve it under the stated interface/control conditions.
Constraints
- Keep the implementation deterministic and consistent with the interface contract described in the task.
Concepts to review
C, timer, interrupt
Open HDLForge to solve this problem in the interactive editor.
Related problems
- Machine Timer Peripheral — Medium
- APB Timer Peripheral — Medium
- Memory-Mapped I/O Accessors — Easy
- GPIO Bare-Metal Driver — Easy
- Polling UART Driver — Medium