<div dir="ltr"><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="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></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>2017-04-18 10:15 GMT+02:00 Thomas Doerfler <span dir="ltr"><<a href="mailto:thomas.doerfler@embedded-brains.de" target="_blank">thomas.doerfler@embedded-brains.de</a>></span>:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br></blockquote><div><br></div><div>Hi,<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
does this link help?<br>
<br>
<a href="https://forums.xilinx.com/t5/Zynq-All-Programmable-SoC/Zynq-Clear-Pending-SGI/td-p/747038" rel="noreferrer" target="_blank">https://forums.xilinx.com/t5/<wbr>Zynq-All-Programmable-SoC/<wbr>Zynq-Clear-Pending-SGI/td-p/<wbr>747038</a></blockquote><div><br></div><div><br>Of course it helps :) Thank you very much. I am going to check this. <br><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
wkr,<br>
<br>
Thomas.<br></blockquote><div><br></div><div>Cheers,<br></div><div> Sergio Paracuellos<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
Am 18.04.2017 um 10:11 schrieb Sergio Paracuellos:<br>
><br>
><br>
><br>
><br>
><br>
> 2017-04-18 9:28 GMT+02:00 Thomas Doerfler<br>
> <<a href="mailto:thomas.doerfler@embedded-brains.de">thomas.doerfler@embedded-<wbr>brains.de</a><br>
</span>> <mailto:<a href="mailto:thomas.doerfler@embedded-brains.de">thomas.doerfler@<wbr>embedded-brains.de</a>>>:<br>
<div><div class="h5">><br>
> Hi,<br>
><br>
><br>
> Hi,<br>
><br>
><br>
> what kind of interrupt source do you have? I assume that the intterrupt<br>
> source keeps it interrupt request active, until you have done something<br>
> in the interrupt source registers that makes the interrupt inactive<br>
> again.<br>
><br>
><br>
><br>
> The interrupt is a Software Generated Interrupt one which uses SGI0 HW IRQ.<br>
><br>
> The interrupt pending bit for the vector is being cleared in<br>
> bsp_interrupt_dispatch() routine for the arm's based bsp's.<br>
><br>
> It should be enough to get this working, but it seems it is not.<br>
> Something that I have to keep in mind?<br>
><br>
><br>
><br>
> Example: If you interrupt source is a UART receiver, the interrupt<br>
> request usually stays active until you have pulled all the received UART<br>
> bytes from the UART receive data register...<br>
><br>
> wkr,<br>
><br>
> Thomas.<br>
><br>
><br>
> Cheers,<br>
> Sergio Paracuellos<br>
><br>
><br>
><br>
> Am 18.04.2017 um 09:24 schrieb Sergio Paracuellos:<br>
> > Hi all,<br>
> ><br>
> > I am trying to exec some code over xilinx-zynq zedboard. The code<br>
> tries<br>
> > to make use of interrupts. I am installing the interrupt routine<br>
> for the<br>
> > interrupt vector using rtems_interrupt_handler_<wbr>install routine<br>
> which is<br>
> > seems the correct one for this board. When the interrupt is<br>
> trigered the<br>
> > handler is correctly called but it becomes in a infinite loop status<br>
> > when the interrupt is being handled. So is obvious that i am doing<br>
> > 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>
> > #define MAX_NUMBER_OF_MESSAGES 5<br>
> ><br>
> > #define INTERRUPT_VECTOR_NUMBER 100<br>
> ><br>
> > volatile int seq;<br>
> ><br>
> > void MyInterruptHandler(void *arg)<br>
> > {<br>
> > puts("Interrupt handler called\n");<br>
> > seq++;<br>
> > }<br>
> ><br>
> > rtems_task Init(rtems_task_argument argument)<br>
> > {<br>
> > rtems_status_code sc;<br>
> ><br>
> > sc = rtems_interrupt_handler_<wbr>install(<br>
> > INTERRUPT_VECTOR_NUMBER,<br>
> > "MY_INTERRUPT",<br>
> > RTEMS_INTERRUPT_UNIQUE,<br>
> > (rtems_interrupt_handler)<br>
> MyInterruptHandler,<br>
> > NULL<br>
> > );<br>
> ><br>
> > if (sc != RTEMS_SUCCESSFUL)<br>
> > {<br>
> > puts("MyInterruptHandler -><br>
> rtems_interrupt_handler_<wbr>install()<br>
> > error: %d\n", sc);<br>
> > exit(-1);<br>
> > }<br>
> ><br>
> > puts("Waiting for messages...\n");<br>
> ><br>
> > /* wait for five interrupts to be triggered */<br>
> > while (1)<br>
> > {<br>
> > if (seq == MAX_NUMBER_OF_MESSAGES)<br>
> > break;<br>
> > }<br>
> ><br>
> > puts("Max number of messages retrieved\n");<br>
> > exit(0);<br>
> > }<br>
> ><br>
> > 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>
> > Enters in a infinite loop calling the interrupt handler....<br>
> ><br>
> > This similar code runs for me in other OS, so i am a little lost.<br>
> Also,<br>
> > I couldn't find any example of using interrupts for zedboard.<br>
> ><br>
> > What is missing in this code?<br>
> ><br>
> > Thanks in advance,<br>
> ><br>
> > Cheers,<br>
> > Sergio Paracuellos<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > users mailing list<br>
</div></div>> > <a href="mailto:users@rtems.org">users@rtems.org</a> <mailto:<a href="mailto:users@rtems.org">users@rtems.org</a>><br>
> > <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
<span class="">> <<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a>><br>
> ><br>
><br>
> --<br>
> ------------------------------<wbr>--------------<br>
> embedded brains GmbH<br>
> Thomas Doerfler<br>
> Dornierstr. 4<br>
> D-82178 Puchheim<br>
> Germany<br>
> email: <a href="mailto:Thomas.Doerfler@embedded-brains.de">Thomas.Doerfler@embedded-<wbr>brains.de</a><br>
</span>> <mailto:<a href="mailto:Thomas.Doerfler@embedded-brains.de">Thomas.Doerfler@<wbr>embedded-brains.de</a>><br>
> Phone: <a href="tel:%2B49-89-18%2094%20741-12" value="+4989189474112">+49-89-18 94 741-12</a> <tel:%2B49-89-18%2094%20741-<wbr>12><br>
> Fax: <a href="tel:%2B49-89-18%2094%20741-09" value="+4989189474109">+49-89-18 94 741-09</a> <tel:%2B49-89-18%2094%20741-<wbr>09><br>
<span class="">> PGP: Public key available on request.<br>
><br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
> ______________________________<wbr>_________________<br>
> users mailing list<br>
</span>> <a href="mailto:users@rtems.org">users@rtems.org</a> <mailto:<a href="mailto:users@rtems.org">users@rtems.org</a>><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
<div class="HOEnZb"><div class="h5">> <<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a>><br>
><br>
><br>
<br>
--<br>
------------------------------<wbr>--------------<br>
embedded brains GmbH<br>
Thomas Doerfler<br>
Dornierstr. 4<br>
D-82178 Puchheim<br>
Germany<br>
email: <a href="mailto:Thomas.Doerfler@embedded-brains.de">Thomas.Doerfler@embedded-<wbr>brains.de</a><br>
Phone: <a href="tel:%2B49-89-18%2094%20741-12" value="+4989189474112">+49-89-18 94 741-12</a><br>
Fax: <a href="tel:%2B49-89-18%2094%20741-09" value="+4989189474109">+49-89-18 94 741-09</a><br>
PGP: Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div></div></blockquote></div><br></div></div>