This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Create interrupt problem
- From: Gary Thomas <gary at mlbassoc dot com>
- To: "Vikas K. Prasad" <vikas dot prasad at ittiam dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 05 Oct 2004 08:34:18 -0600
- Subject: Re: [ECOS] Create interrupt problem
- Organization: MLB Associates
- References: <45A1F95BB9D7D84FAB0A1EB4D67EEF96018ACDC0@is01ex01.ittiam.com>
On Tue, 2004-10-05 at 08:24, Vikas K. Prasad wrote:
> Hi,
>
> I was unable to attach an ISR properly. I am using a custom
> board (with excalibur on it) on which the basic ecos features
> are working and now I am testing the interrupts.
>
> I used the following command:
> cyg_interrupt_create((cyg_vector_t)TIMER1_VECTOR, /* Vector */
> (cyg_priority_t)TIMER1_PRI, /* Priority */
> TIMER1_DAT, /* Interrupt data */
> (cyg_ISR_t*)timer1_isr, /* ISR handler */
> (cyg_DSR_t*)timer1_dsr, /* DSR handler */
> &timer1_handle, /* Interrupt handle */
> &timer1_obj);
>
> With this after execution of the command I see that some
> junk values are stored in timer1_obj.
>
> (gdb) p/x * (cyg_interrupt*)timer1_obj
> $16 = {vector = 0xe3a00a40, priority = 0xe3a01880, isr = 0xe0410000,
> dsr = 0xe04ff000, data = 0xe1a00000, dsr_count = 0xe59f022c,
> next_dsr = 0xe3a01007}
This command makes no sense. You told eCos to put the interrupt
object in 'timer1_obj', but you are asking GDB to use the contents
of 'timer1_obj' as a pointer.
You really should write:
(gdb) p/x timer1_obj
>
> Because of this, hal_default_isr() is called and my ISR is never
> hit. Can you please give me some clues as to where the problem
> lies ? I am suspecting that the ISR routines are not not attached
> properly. Anything that I need to specifically do in the platform
> port for this?
After you created the interrupt, did you attach it? Did you
unmask it?
Try looking at the myriad of uses of the cyg_interrupt_XXX()
functions in the eCos code base and read the documentation.
Just creating an interrupt object does not allow interrupts
to happen.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss