summaryrefslogtreecommitdiff
path: root/chip/mec1322/util
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2021-12-20 12:12:21 +0100
committerCommit Bot <commit-bot@chromium.org>2022-01-19 17:57:52 +0000
commit8e2f1ed611679ae42779748596e5f6482bd9f6b6 (patch)
treeacc4899eba38bcf3c4cdbf6ffabc1aefcccc0ff1 /chip/mec1322/util
parenta13821d34669aa01a863ad1ea5cc6292234fe006 (diff)
downloadchrome-ec-8e2f1ed611679ae42779748596e5f6482bd9f6b6.tar.gz
stm32/hwtimer: Clear status register after counter is set
Whenever a timer interrupt occurs, the status register is checked for overflow and the overflow status is passed to process_timers(), which increments clksrc_high. When setting the clock to a new time, we don't want the previous overflow state to trigger this process. To avoid this problem, just clear status register when new value is assigned to counter. To avoid race between updating counter and clearing status, operation is performed when counters are disabled. BUG=b:200828093 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ifa3f2ff293483e167b5c7b6ff136708a876e8054 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3378344 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'chip/mec1322/util')
0 files changed, 0 insertions, 0 deletions