mirror of
https://github.com/gosticks/RIOT.git
synced 2026-10-05 15:27:09 +00:00
Merge pull request #11046 from kaspar030/reset_fe310_timer
cpu/fe310: periph/timer: reset counter in timer_init()
This commit is contained in:
@@ -53,7 +53,11 @@ int timer_init(tim_t dev, unsigned long freq, timer_cb_t cb, void *arg)
|
||||
isr_cb = cb;
|
||||
isr_arg = arg;
|
||||
|
||||
/* No other configuration */
|
||||
|
||||
/* reset timer counter */
|
||||
volatile uint64_t *mtime = (uint64_t *) (CLINT_CTRL_ADDR + CLINT_MTIME);
|
||||
*mtime = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user