Posts: 9
Joined: Wed Dec 20, 2017 6:55 pm

understanding the arm timer

Sun Jan 14, 2018 4:30 pm

In the broadcom data sheet it is written about the value register of the arm timer:
This register holds the current timer value and is counted down when the counter is running. It is
counted down each timer clock until the value 0 is reached. Then the value register is re-loaded from
the timer load register and the interrupt pending bit is set.
Does that mean that the interrupt handler for the timer runs only when the value register reaches 0 ?

Posts: 936
Joined: Sat May 26, 2012 5:32 pm

Re: understanding the arm timer

Sun Jan 14, 2018 10:28 pm

no it means the interrupt from this peripheral fires when it reaches zero. this is fairly typical with timers, when the roll over they fire an interrupt, some count down some count up some count down to zero some count up to N and reload with zero, etc. You control the interrupt rate in this case with the re-load value.

to get an interrupt handler to run you need to enable the interrupt from the peripheral to the core then enable interrupts in the core, which depending on the core you are using, modes, etc, will vary. that all starts though by getting the peripheral to generate an interrupt.


Return to “Bare metal, Assembly language”

Who is online

Users browsing this forum: No registered users and 3 guests