This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b60a8b216b arch/risc-v/src/litex_ticked: Set initial tick count to
known value.
b60a8b216b is described below
commit b60a8b216bd36b33ac1b37093ef11e071a8d1114
Author: Stuart Ianna <[email protected]>
AuthorDate: Thu Sep 19 23:34:17 2024 +0000
arch/risc-v/src/litex_ticked: Set initial tick count to known value.
The tick count should be manually set as there is no guarantee that the
previous boot stage hasn't modified this count since reset.
---
arch/risc-v/src/litex/litex_ticked.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/risc-v/src/litex/litex_ticked.c
b/arch/risc-v/src/litex/litex_ticked.c
index 34d49842e1..f380a4a797 100644
--- a/arch/risc-v/src/litex/litex_ticked.c
+++ b/arch/risc-v/src/litex/litex_ticked.c
@@ -81,6 +81,7 @@ void up_timer_initialize(void)
/* Set the timer period */
+ putreg32(TICK_COUNT, LITEX_TIMER0_LOAD);
putreg32(TICK_COUNT, LITEX_TIMER0_RELOAD);
/* Attach timer interrupt handler */