Skip to content
Commit 2bda7b87 authored by Jun Lin's avatar Jun Lin Committed by Benjamin Cabé
Browse files

driver: timer: npcx: bypass timer counter reading issue



Originally, when the timer's source clock is 32.768 kHz, the timer driver
uses two consecutive reads to ensure the timer reading is correct.
However, it is not robust enough due to an asynchronous timing issue in
the chip. The workaround is to add at least two NOPs between the
LDR and CMP instructions. This commit implements the workaround in the
assembly code to ensure it is not affected by the compiler toolchain
or optimization flags.

Signed-off-by: default avatarJun Lin <CHLin56@nuvoton.com>
parent bdf05004
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment