public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
@ 2000-05-30 13:27 Ivan Griffin
  2000-05-30 13:35 ` Gary Thomas
  2000-05-31  6:00 ` Hugo Tyson
  0 siblings, 2 replies; 5+ messages in thread
From: Ivan Griffin @ 2000-05-30 13:27 UTC (permalink / raw)
  To: ecos-discuss

I'm trying to do the following in cyg_prestart() to hook the IRQ and FIQ
interrupts on the ARM AEB-7.  Can anyone tell me why the following code
doesn't appear to work?

#define ARM_IRQ_INTR 0x18
#define ARM_FIQ_INTR 0x1c

extern void IRQ_Veneer(void);
extern void FIQ_Handler(void);

void cyg_prestart(void)
{
    cyg_interrupt_disable();
    cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
    cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
    cyg_interrupt_enable();
}

Best Regards,
Ivan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
  2000-05-30 13:27 [ECOS] cyg_interrupt_set_vsr and ARM AEB-1 Ivan Griffin
@ 2000-05-30 13:35 ` Gary Thomas
  2000-05-30 13:55   ` Ivan Griffin
  2000-05-31  6:00 ` Hugo Tyson
  1 sibling, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2000-05-30 13:35 UTC (permalink / raw)
  To: Ivan Griffin; +Cc: ecos-discuss

On 30-May-00 Ivan Griffin wrote:
> I'm trying to do the following in cyg_prestart() to hook the IRQ and FIQ
> interrupts on the ARM AEB-7.  Can anyone tell me why the following code
> doesn't appear to work?
> 
>#define ARM_IRQ_INTR 0x18
>#define ARM_FIQ_INTR 0x1c
> 
> extern void IRQ_Veneer(void);
> extern void FIQ_Handler(void);
> 
> void cyg_prestart(void)
> {
>     cyg_interrupt_disable();
>     cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
>     cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
>     cyg_interrupt_enable();
> }
> 

What does it appear to do [if not work]?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
  2000-05-30 13:35 ` Gary Thomas
@ 2000-05-30 13:55   ` Ivan Griffin
  0 siblings, 0 replies; 5+ messages in thread
From: Ivan Griffin @ 2000-05-30 13:55 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

woops, perhaps I should have been a bit more descriptive the first time
around.

The IRQ Handler should flash the LEDs on the AEB every 800 interrupts
 - each
interrupt comes from an external hardware source about every
milli-second]
This does not happen.

However, the code is verified using the ARM compiler (minus eCos, using
a simple scheduler).

I'm using a stripped binary, downloaded via the ARM Multi-ICE and ADW
for Windows
(a real pain to debug -- using the symbols !) -- so I can see that the
non-interrupt related
portion of the software is running correctly.

Is there some reason these interrupts would still be hooked by eCos for
some purpose?
Or is it possible that output port C of the PPI on the AEB is being
setup not to drive
the LEDs?

Regards,
Ivan.

----- Original Message -----
From: Gary Thomas <gthomas@redhat.com>
To: Ivan Griffin <ivan.griffin@parthus.com>
Cc: <ecos-discuss@sourceware.cygnus.com>
Sent: Tuesday, May 30, 2000 9:34 PM
Subject: RE: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1


>
> On 30-May-00 Ivan Griffin wrote:
> > I'm trying to do the following in cyg_prestart() to hook the IRQ and
FIQ
> > interrupts on the ARM AEB-7.  Can anyone tell me why the following
code
> > doesn't appear to work?
> >
> >#define ARM_IRQ_INTR 0x18
> >#define ARM_FIQ_INTR 0x1c
> >
> > extern void IRQ_Veneer(void);
> > extern void FIQ_Handler(void);
> >
> > void cyg_prestart(void)
> > {
> >     cyg_interrupt_disable();
> >     cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
> >     cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
> >     cyg_interrupt_enable();
> > }
> >
>
> What does it appear to do [if not work]?
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
  2000-05-30 13:27 [ECOS] cyg_interrupt_set_vsr and ARM AEB-1 Ivan Griffin
  2000-05-30 13:35 ` Gary Thomas
@ 2000-05-31  6:00 ` Hugo Tyson
  2001-09-05  0:10   ` Hugo Tyson
  1 sibling, 1 reply; 5+ messages in thread
From: Hugo Tyson @ 2000-05-31  6:00 UTC (permalink / raw)
  To: ecos-discuss


"Ivan Griffin" <ivan.griffin@parthus.com> writes:
> I'm trying to do the following in cyg_prestart() to hook the IRQ and FIQ
> interrupts on the ARM AEB-7.  Can anyone tell me why the following code
> doesn't appear to work?
> 
> #define ARM_IRQ_INTR 0x18
> #define ARM_FIQ_INTR 0x1c
> 
> extern void IRQ_Veneer(void);
> extern void FIQ_Handler(void);
> 
> void cyg_prestart(void)
> {
>     cyg_interrupt_disable();
>     cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
>     cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
>     cyg_interrupt_enable();
> }

You should use these constants (from hal_intr.h) as the argument.

	#define CYGNUM_HAL_VECTOR_IRQ                  6
	#define CYGNUM_HAL_VECTOR_FIQ                  7

You are hitting trampoline addresses that are off the end of the table, and
no, sorry, it doesn't have any range checking ;-(

Aha, BUT it does have asserts on the vector range: a motto for life ;-) "if
in doubt, compile with asserts enabled" - I infer that you ain't or you
would have seen an assert fail.

Just in case: if those really are void...(void) C routines, it'll all go
horribly wrong.  If you're using extern void FOO(void); just to get hold of
a external address in C, and they're proper interrupt handlers writ in asm,
you'll be OK.

	- Huge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
  2000-05-31  6:00 ` Hugo Tyson
@ 2001-09-05  0:10   ` Hugo Tyson
  0 siblings, 0 replies; 5+ messages in thread
From: Hugo Tyson @ 2001-09-05  0:10 UTC (permalink / raw)
  To: ecos-discuss


"Ivan Griffin" <ivan.griffin@parthus.com> writes:
> I'm trying to do the following in cyg_prestart() to hook the IRQ and FIQ
> interrupts on the ARM AEB-7.  Can anyone tell me why the following code
> doesn't appear to work?
> 
> #define ARM_IRQ_INTR 0x18
> #define ARM_FIQ_INTR 0x1c
> 
> extern void IRQ_Veneer(void);
> extern void FIQ_Handler(void);
> 
> void cyg_prestart(void)
> {
>     cyg_interrupt_disable();
>     cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
>     cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
>     cyg_interrupt_enable();
> }

You should use these constants (from hal_intr.h) as the argument.

	#define CYGNUM_HAL_VECTOR_IRQ                  6
	#define CYGNUM_HAL_VECTOR_FIQ                  7

You are hitting trampoline addresses that are off the end of the table, and
no, sorry, it doesn't have any range checking ;-(

Aha, BUT it does have asserts on the vector range: a motto for life ;-) "if
in doubt, compile with asserts enabled" - I infer that you ain't or you
would have seen an assert fail.

Just in case: if those really are void...(void) C routines, it'll all go
horribly wrong.  If you're using extern void FOO(void); just to get hold of
a external address in C, and they're proper interrupt handlers writ in asm,
you'll be OK.

	- Huge

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-05  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-30 13:27 [ECOS] cyg_interrupt_set_vsr and ARM AEB-1 Ivan Griffin
2000-05-30 13:35 ` Gary Thomas
2000-05-30 13:55   ` Ivan Griffin
2000-05-31  6:00 ` Hugo Tyson
2001-09-05  0:10   ` Hugo Tyson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).