Heikki Lindholm wrote:
Niklaus Giger kirjoitti:
Hi

I tried to use the FIT (Fixed Interrupt Timer) on my PPC405GPr board, which uses 0x1010 as its interrupt vector in a user space (vxworks-skin) application.
<..>
  RT_INTR FITnterrupt;
  res = rt_intr_create(&FITnterrupt, 0, 0x1010, I_NOAUTOENA);
<..>
But I got -22 EINVAL as error.
Could somebody please tell me, what is wrong with my example.

The 0x1010 is the HW interrupt vector, but the argument should be the interrupt _line_. Besides, last time I checked, the ppc405 FIT isn't even 'wired' in the kernel; actually, there's no space for the interrupt prologue code, which basically results that no handler is called when the FIT interrupt occurs.

Yes, in head_4xx.c there is the following note:

  /* NOTE:
   * FIT and WDT handlers are not implemented yet.
   */

But the relevant code could be copied from the PIT interrupt.

  /* 0x1000 - Programmable Interval Timer (PIT) Exception */
        START_EXCEPTION(0x1000, Decrementer)
        NORMAL_EXCEPTION_PROLOG
        lis     r0,[EMAIL PROTECTED]
        mtspr   SPRN_TSR,r0             /* Clear the PIT exception */
        addi    r3,r1,STACK_FRAME_OVERHEAD
  #ifdef CONFIG_IPIPE
        EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
  #else /* !CONFIG_IPIPE */
        EXC_XFER_LITE(0x1000, timer_interrupt)
  #endif /* CONFIG_IPIPE */

and modified accordingly.

Wolfgang.


Wolfgang.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to