This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Problem about installing the eCOS interrupt handler
- To: "eCos" <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] Problem about installing the eCOS interrupt handler
- From: "HuangQiang" <jameshq at liverpool dot ac dot uk>
- Date: Wed, 3 Oct 2001 16:17:05 +0100
Hi all:
I am using ARME7T board at the moment. I have tried to install external
INT0 in eCOS program but I encounter some strange problem so could anybody
have a look of it for me? Thank you very much! Following are the source
code:
// external IRQ0 handler
cyg_uint32 EXT_IRQ0_handler(cyg_vector_t vector, cyg_addrword_t data)
{
// do something
cyg_interrupt_acknowledge(vector);
return CYG_ISR_HANDLED;
}
// main function
void cyg_user_start(void)
{
cyg_handle_t ext_IRQ0_H;
cyg_interrupt intr;
// value for storing
unsigned long cpuval;
cyg_interrupt_enable();
cpuval = *IOPMODE;
cpuval = *IOPCON;
// when I check the cpuval it shows 0x00 for *IOPCON ( Step by step in
Insight)
cyg_interrupt_configure(CYGNUM_HAL_INTERRUPT_EXT0,1,0);
cpuval = *IOPCON;
// when I check the cpuval it shows 0x00 for *IOPCON
// create the interrupt and attach it
cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_EXT0, 0, 0, &EXT_IRQ0_handler,
NULL, &ext_IRQ0_H, &intr);
cpuval = *IOPCON;
// when I check the cpuval it shows 0x00 for *IOPCON
// attach the interrupt
cyg_interrupt_attach(ext_IRQ0_H);
cpuval = *IOPMODE;
cpuval = *IOPCON;
// *IOPCON still 0x00
cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_EXT0);
}
each time I call the interrupt setting function the *IOPCON seems to be the
same as before. always 0x00, no change?
Thanks !
Mr Huang Qiang
Postgraduate Student
Room318 B-Block
Department Of Electrical Engineering And Electronics
University Of Liverpool
Brownlow Hill
Liverpool L69,3GJ
UK
Personal website at: http://www.liv.ac.uk/~jameshq