arm armv7-timer

arm armv7-timer: Learn the architecture - Generic Timer,ARMv7 Generic Timers - OSDev Wiki,Technical Reference Manual - ARM architecture family,PDF AArch64 Programmer's Guide: Generic Timer - Arm Developer,
arm armv7-timer

2024-07-07

Đăng Ký Tặng Free 150K
LĐăng nhập

I am writing a part of kernel code in ARMv8 RTOS. I am trying to do a function like gettimeofday () in Linux, which can return system time in second and microsecond. But I failed to do that. ARMv8 support PL031, I think it is working at freq. of 1Hz, I cannot get the time in microsecond.
The ARM architecture defines how an ARM processor must operate. This includes: † the programmers model † the instruction set † system configuration † exception handling † the memory model. New versions of the architecture can introduce changes or additions to any of these features.
In ARM V7 RM, I saw "This chapter describes the implementation of the ARM Generic Timer as an OPTIONAL extension to an ARMv7-A or ARMv7-R processor implementation. So, I think it means that a SoC implementation can choice to involve the system timer or not.
The Generic Timer provides a system counter with the following specification: Width. At least 56 bits wide. The value returned by any 64-bit read of the counter is zero-extended to 64 bits. Frequency. Increments at a fixed frequency, typically in the range 1-50MHz.