6840ptm: fix divide by 8 mode

In divide by 8 mode the value computed in compute_counter()
is wrong because the function doesn't divide the clock before
the calculation.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
This commit is contained in:
Sven Schnelle 2018-06-23 15:49:09 +02:00
parent dd30364632
commit 20f0c7c2a2

View File

@ -307,6 +307,10 @@ uint16_t ptm6840_device::compute_counter( int counter ) const
else
{
clk = m_external_clock[counter];
if (counter == 2)
{
clk /= m_t3_divisor;
}
LOG("Timer #%d external clock freq %f \n", counter + 1, clk);
}
// See how many are left