internal static void Run(HalClockNull clock, TimerOmap3430 gpTimer1) { DebugStub.Print("CLOCK CALIBRATION NOT ATTEMPTED.\n"); // hacked, should calibrate Processor.CyclesPerSecond = 687 * 1000 * 1000; // MPU runs @ 687Mhz in OPP1 gpTimer1.SetTicksPerSecond(32768); return; }
public override void ReleaseResources() { clock.ReleaseResources(); clock = null; timer.ReleaseResources(); timer = null; pic.ReleaseResources(); pic = null; }
public override void Initialize(Processor rootProcessor) { DebugStub.Print("HalDevices.Initialize() - ARM\n"); // PIC PnpConfig picConfig = (PnpConfig)IoSystem.YieldResources("/arm/ti/3430/INTCPS", typeof(Pic)); pic = new Pic(picConfig); pic.Initialize(); // Timer PnpConfig timerConfig = (PnpConfig)IoSystem.YieldResources("/arm/ti/3430/GPTIMER1", typeof(TimerOmap3430)); timer = new TimerOmap3430(timerConfig, pic); byte timerInterrupt = timer.Initialize(); // Real-time clock clock = new HalClockNull(); byte clockInterrupt = clock.Initialize(); bool noisyTimer = false; CalibrateTimers.Run(clock, timer); SystemClock.Initialize(clock, TimeSpan.FromHours(8).Ticks); rootProcessor.AddPic(pic); rootProcessor.AddTimer(timerInterrupt, timer); rootProcessor.AddClock(clockInterrupt, clock); // ---------------------------------------------------------- // Add Srat tables to the Processor halMemory = new HalMemoryNull(); ProcessorNode.AddMemory(halMemory); timer.Start(); halScreen = new HalScreenNull(); Console.Screen = (HalScreen)halScreen; }