Skip to content
Commit 36365e38 authored by Adithya Baglody's avatar Adithya Baglody Committed by Anas Nashif
Browse files

drivers: timers: systick: Enforce a barrier in _timer_cycle_get_32.



The code assumes that when the systick counter hits zero,
the timer interrupt will be taken before the loop can
read the LOAD/VAL registers, but this is not architecturally
guaranteed, and so the code can see a post-reload SysTick->VAL
and a pre-reload clock_accumulated_count, which causes it to
return an incorrectly small cycle count. By adding a ISB we
overcome this issue.

Signed-off-by: default avatarAdithya Baglody <adithya.nagaraj.baglody@intel.com>
parent 023bc923
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment