mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
Merge pull request #11046 from kaspar030/reset_fe310_timer
cpu/fe310: periph/timer: reset counter in timer_init()
This commit is contained in:
commit
38cc72d0e0
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user