This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Interrupt on e7t AEB2
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] Interrupt on e7t AEB2
- From: Carlos Camargo <carlos_ivan_camargo at yahoo dot com>
- Date: Mon, 9 Jul 2001 06:36:42 -0700 (PDT)
Hi all..
I'm using arm evaluation board ARM evaluator 7T and
redboot
When i try debugg the following program (this programm
was provided for JL) the ISR and DRS no are executed.
anybody can help me
Thanks
Carlos Camargo
***********************************
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <cyg/hal/hal_intr.h>
#define SYSCFG 0x03ff0000
#define IOPMOD ((volatile unsigned
*)(SYSCFG+0x5000))
#define IOPDATA ((volatile unsigned
*)(SYSCFG+0x5008))
#define SEG_MASK (0x1fc00)
volatile int i=0;
/* this is the ISR for ext 0 interrupts */
cyg_uint32 int_0_isr(cyg_vector_t vector,
cyg_addrword_t data)
{
/* ISRs must acknowledge the interrupt, or they
might be invoked
again */
cyg_interrupt_acknowledge(vector);
return CYG_ISR_CALL_DSR;
}
/* this is the DSR for ext 0 interrupts */
void int_0_dsr(cyg_vector_t vector, cyg_ucount32
count, cyg_addrword_t data)
{
/* put your code here; for details of ISRs and DSRs
see eCos documentation */
/* the following serves only as an example: */
*IOPDATA &= ~SEG_MASK;
*IOPDATA |= 0xff;
i += count;
}
int main( int argc, char *argv[] )
{
cyg_handle_t int_0_ISR_H;
cyg_interrupt intr;
int oldi = 0;
cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_EXT0, 0,
0, &int_0_isr,
&int_0_dsr, &int_0_ISR_H,
&intr);
cyg_interrupt_attach(int_0_ISR_H);
for (;;) {
if (i != oldi) {
printf("Now received %d interrupts\n", i);
oldi = i;
}
}
return 0;
*************************************
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/