Skip to content
Commit cd14317c authored by Jean-Paul Etienne's avatar Jean-Paul Etienne Committed by Anas Nashif
Browse files

timer: riscv_machine_timer: prevent spurious interrupt while rearming the timer



Rearming the riscv machine timer is done by first updating the
mtimecmp low value register. If the low value is updated with a
relatively small value, a timer interrupt can be generated while
updating the mtimecmp high value.

To avoid such a spurious interrupt to occur, disable the timer
interrupt while rearming the timer.

Change-Id: I50ab3f19554a9a8dfe70943b6da0d20be3de88dc
Signed-off-by: default avatarJean-Paul Etienne <fractalclone@gmail.com>
parent 1451f82a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment