Timer_Initialize

WuHao derossi at mail.ustc.edu.cn
Sat May 5 07:22:17 UTC 2007


Hi:

  I use RTEMS4 and the pc386 BSP and got some problem with Timer_Initialize.

   1. I search for the old mail_lists and find a similar problem:


  **************************************************


  Timer_Initialize

------------------------------------------------------------------------

    * /Date/: Fri, 08 Oct 1999 10:28:18 +0200
    * /From/: reuther at kinzinger.de (Udo Reuther)
    * /Subject/: Timer_Initialize

------------------------------------------------------------------------

Hello all,

I use RTEMS4 and the pc386 BSP.

I tried to do some timing measurements and copied code from one of the
timing tests.
But the call to Timer_Initialize failed, reporting "raw handler
connexion failed".

This is what happened: 

/* Function Timer_Initialize in file timer.c:238 */

if (!i386_set_idt_entry (&timer_raw_irq_data)) {
  printk("raw handler connexion failed\n");
  rtems_fatal_error_occurred(1);
}


/* Function i386_set_idt_entry im file cpu.c:83 */

if (get_hdl_from_vector(irq->idtIndex) != default_raw_irq_entry.hdl) {
  return 0;
}

The returned value is (void (*)()) 0x18dd50 <rtems_irq_prologue_0>, 
whereas default_raw_irq_entry.hdl = (void (*)()) 0x18de4d
<default_raw_idt_handler>.

What did I miss ?

Regards, 
	Udo


  **************************************************

What is the resolution?


2.Also in Timer_initialize
/*code in Timer_initialize in file timer.c*/
while (Ttimer_val == 0)
continue;
When an ISR calls Timer_initialize,the system will loop forever since in
ISR interrupts are disabled.
(I found this when I try to run tm27 test.The task1 installs a
Isr_handler,then the Isr_handler will call Timer_initialize.)
thanks.




More information about the users mailing list