mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
epit timer: raise precision
Previously we used a pretty slow external clock source for the timer. This resulted in such a low TICS_PER_MS value that the granularity wasn't sufficient to find a setup with a precision better than 1 second error per minute. Now we use the so-called High Frequency Reference Clock as input with TICS_PER_MS=33333 and the timer precision is significantly < 1 second per minute. Fixes #1805
This commit is contained in:
parent
01643ccd94
commit
492bd39619
@ -29,7 +29,7 @@ class Genode::Epit_base : public Mmio
|
||||
{
|
||||
protected:
|
||||
|
||||
enum { TICS_PER_MS = 32 };
|
||||
enum { TICS_PER_MS = 33333 };
|
||||
|
||||
/**
|
||||
* Control register
|
||||
@ -69,7 +69,7 @@ class Genode::Epit_base : public Mmio
|
||||
|
||||
struct Clk_src : Bitfield<24, 2> /* select clock input */
|
||||
{
|
||||
enum { IPG_CLK_32K = 3 };
|
||||
enum { HIGH_FREQ_REF_CLK = 2 };
|
||||
};
|
||||
|
||||
/**
|
||||
@ -89,7 +89,7 @@ class Genode::Epit_base : public Mmio
|
||||
Doz_en::bits(0) |
|
||||
Stop_en::bits(0) |
|
||||
Om::bits(Om::DISCONNECTED) |
|
||||
Clk_src::bits(Clk_src::IPG_CLK_32K);
|
||||
Clk_src::bits(Clk_src::HIGH_FREQ_REF_CLK);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user