This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problems with the user interupts on e7t can anyone help?


Hi all,

could anyone help me with the interupt setting for e7t. I want to create an 
interupt if the user button is pressed. I created the interupts as follows 
butt nothing happens

void cyg_user_start(void)//void main(void)
{    
  printf("in cyg_user_start\n");

//*IOPCON = 0x10;

  cyg_interrupt_enable();
  cyg_interrupt_configure(CYGNUM_HAL_INTERRUPT_EXT0,1,1); //tried bot high 
and low detection	
  cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_EXT0, 0, 0, &user_interupt,
        NULL, &user_int0, &intr);
	
  cyg_interrupt_attach(user_int0);
  cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_EXT0); 

  cyg_thread_create(4,thread2 , (cyg_addrword_t) 0, "serial_poll",
        (void *)stack[0], STACKSIZE, &thread_handle[0], &thread[0]);
  cyg_thread_create(4, simple_prog, (cyg_addrword_t) 1, "serial2",
        (void *)stack[1], STACKSIZE, &thread_handle[1], &thread[1]);

  cyg_thread_resume(thread_handle[0]);
  cyg_thread_resume(thread_handle[1]);
}

I found a previous posting where the line *IOPCON = 0x10; was added. this 
makes it work but it detects an interupt without the button being pressed. 
I changed the configuration around but it doesnt't make a difference. do I 
have to manipulate the IOPCON and INTMASK registers manualy?

if anyone could help me with my little problem it would be much apreichiated

Cheers

fred

         ---------------------------------------------------
            --------------- F R E D D A N---------------
                ------------------------------------
                      ------------------------
________________________________________________________________

DISCLAIMER:

This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
________________________________________________________________

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]