Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading 64-bit timer #1

Open
toptensoftware opened this issue Aug 1, 2023 · 0 comments
Open

Reading 64-bit timer #1

toptensoftware opened this issue Aug 1, 2023 · 0 comments

Comments

@toptensoftware
Copy link

Hi, I stumbled across your docs here while searching for info on reading the 64-bit system timer on raspberry pi and noted your comment about not being able to reliably read the two 32-bit parts atomically:

(which Raspbian is) there is no guarantee that we could read the high 32 bit

You might be interested in this document, where in the section on "64-bit timer read/write" it mentions that if you read the LS32 first, the MS32 is gated to allow accurate reading of the 64-bit value:

https://datasheets.raspberrypi.com/bcm2836/bcm2836-peripherals.pdf

When reading the 64-bit timer value the user must always read the LS 32 bits first. At the same time the
LS-32 bits are read, internal a copy is made of the MS-32 bits into a timer-read-hold register. When
reading the timer MS-32 bits actually the timer-read-hold register is read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant