Fix timer clock computation
This commit is contained in:
parent
799ac9f51a
commit
4449acada0
|
@ -7,7 +7,7 @@
|
|||
|
||||
/* Compute clocks until the next decrement to zero */
|
||||
static uint32_t tmrGetUntil(VB *sim) {
|
||||
uint32_t full = sim->tmr.reload * (sim->tmr.t_clk_sel ? 400 : 2000);
|
||||
uint32_t full = (sim->tmr.reload + 1) * (sim->tmr.t_clk_sel ? 400 : 2000);
|
||||
uint32_t cur = sim->tmr.clocks +
|
||||
(sim->tmr.t_clk_sel ? 0 : 400 * (4 - sim->tmr.tick20));
|
||||
return sim->tmr.counter == 0 ?
|
||||
|
|
Loading…
Reference in New Issue