Increase PIT divisor again to reduce wasted interrupt handling time

This commit is contained in:
Jeremy Soller
2022-11-15 11:50:23 -07:00
parent 33aa263deb
commit 111606ccdc
2 changed files with 4 additions and 4 deletions

View File

@@ -13,8 +13,8 @@ const MODE_2: u8 = 0b010 << 1;
// 1 / (1.193182 MHz) = 838,095,110 femtoseconds ~= 838.095 ns
pub const PERIOD_FS: u128 = 838_095_110;
// 461 / (1.193182 MHz) = 3863618.00071 ns ~= 386 us or 2.588 kHz
pub const CHAN0_DIVISOR: u16 = 461;
// 4847 / (1.193182 MHz) = 4,062,247 ns ~= 4.1 ms or 246 Hz
pub const CHAN0_DIVISOR: u16 = 4847;
// Calculated interrupt period in nanoseconds based on divisor and period
pub const RATE: u128 = (CHAN0_DIVISOR as u128 * PERIOD_FS) / 1_000_000;

View File

@@ -13,8 +13,8 @@ const MODE_2: u8 = 0b010 << 1;
// 1 / (1.193182 MHz) = 838,095,110 femtoseconds ~= 838.095 ns
pub const PERIOD_FS: u128 = 838_095_110;
// 461 / (1.193182 MHz) = 3863618.00071 ns ~= 386 us or 2.588 kHz
pub const CHAN0_DIVISOR: u16 = 461;
// 4847 / (1.193182 MHz) = 4,062,247 ns ~= 4.1 ms or 246 Hz
pub const CHAN0_DIVISOR: u16 = 4847;
// Calculated interrupt period in nanoseconds based on divisor and period
pub const RATE: u128 = (CHAN0_DIVISOR as u128 * PERIOD_FS) / 1_000_000;