<div dir="ltr"><div><div>Hi all,<br><br></div>I am trying to exec some code over xilinx-zynq zedboard. The code tries to make use of interrupts. I am installing the interrupt routine for the interrupt vector  using rtems_interrupt_handler_install routine which is seems the correct one for this board. When the interrupt is trigered the handler is correctly called but it becomes in a infinite loop status when the interrupt is being handled. So is obvious that i am doing something wrong. The pseudo code for this is like the following:<br><br>#include <bsp.h><br>#include <stdlib.h><br>#include <rtems/irq.h><br>#include <rtems/irq-extension.h><br><br></div><div>#define MAX_NUMBER_OF_MESSAGES 5<br><br></div><div>#define INTERRUPT_VECTOR_NUMBER 100<br><br></div><div>volatile int seq;<br><br>void MyInterruptHandler(void *arg)<br>{<br></div><div>    puts("Interrupt handler called\n");<br></div><div>    seq++;   <br></div><div>}<br><br>rtems_task Init(rtems_task_argument argument)<br>{<br>    rtems_status_code sc;<br><br>    sc = rtems_interrupt_handler_install(<br>                           INTERRUPT_VECTOR_NUMBER,<br>                           "MY_INTERRUPT",<br>                           RTEMS_INTERRUPT_UNIQUE,<br>                           (rtems_interrupt_handler) MyInterruptHandler,<br>                            NULL<br>           );<br>   <br>     if (sc != RTEMS_SUCCESSFUL)<br>     {<br>           puts("MyInterruptHandler -> rtems_interrupt_handler_install() error: %d\n", sc);<br></div><div>           exit(-1);<br></div><div>      }<br><br>     puts("Waiting for messages...\n");<br><br></div><div>     /* wait for five interrupts to be triggered */<br></div><div>    while (1)<br>    {<br>          if (seq == MAX_NUMBER_OF_MESSAGES)<br>              break;<br>     }<br><br></div><div>     puts("Max number of messages retrieved\n");<br></div><div>     exit(0);<br>}<br><br></div><div>The result is:<br><br>Waiting for messages...<br><br>Interrupt handler called<br>Interrupt handler called<br>Interrupt handler called<br>Interrupt handler called<br>Interrupt handler called<br>Interrupt handler called<br>Interrupt handler called<br>....<br><br></div><div>Enters in a infinite loop calling the interrupt handler....<br><br></div><div>This similar code runs for me in other OS, so i am a little lost. Also, I couldn't find any example of using interrupts for zedboard.<br><br></div><div>What is missing in this code? <br><br></div><div>Thanks in advance,<br><br></div><div>Cheers,<br></div><div>    Sergio Paracuellos<br></div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><table style="font-family:calibri;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)" border="0"><tbody><tr><td><br></td><td style="font-size:11px;padding:25px 10px 10px" valign="top"><br></td></tr><tr><td colspan="2" style="font-size:12px;font-family:calibri"><br></td></tr></tbody></table></div></div></div></div></div></div></div>