<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 05/11/2012 12:18 PM, Ivica Eftimovski wrote:
    <blockquote
cite="mid:5F1B874BF5D24643AF84FBF14CEC7BAB2B500833BB@ENTMAIL02.tad.teledyne.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <base href="x-msg://2924/">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif][if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Eric,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks
            for the quick reply. The printf was just a dummy there, but
            I replaced it with the global that increments from zero if
            the ISR is entered and it has never updated. I must be doing
            something wrong, but cannot figure out what.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    Like Eric, I am not fixing your problem but make sure the <br>
    variable is volatile.  Otherwise, the task code may not see<br>
    it updated.<br>
    <br>
    Also verify again that before you start polling on the variable<br>
    that interrupts are enabled on the processor (SR) and any PIC<br>
    if this has one.<br>
    <br>
    Since you are forcing the interrupt, is there any chance, this<br>
    is edge-triggered or something that tying it high doesn't show?<br>
    <br>
    Or that you could be getting it continuously and not able to<br>
    get back to the task?  Can the ISR do something you can see<br>
    like blink an LED?<br>
    <br>
    Sorry for the random stream of consciousness but you<br>
    may or may not be triggering the interrupt right, have<br>
    enabled it completely, getting to the ISR handler, or<br>
    be getting continuous interrupts.  All are possibilities.<br>
    <br>
    --joel<br>
    <blockquote
cite="mid:5F1B874BF5D24643AF84FBF14CEC7BAB2B500833BB@ENTMAIL02.tad.teledyne.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
                Eric Norum [<a class="moz-txt-link-freetext" href="mailto:wenorum@lbl.gov">mailto:wenorum@lbl.gov</a>] <br>
                <b>Sent:</b> Friday, May 11, 2012 12:05 PM<br>
                <b>To:</b> Ivica Eftimovski<br>
                <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
                <b>Subject:</b> Re: Coldfire (MCF5235) Interrupt Problem<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <p class="MsoNormal">On May 11, 2012, at 8:55 AM, Ivica
              Eftimovski wrote:<o:p></o:p></p>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
          <div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New"">Hi all,</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New""> </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New"">I am just starting with RTEMS and I am
                  trying to interface the MCF5235 BCC board to our
                  existing hardware. I am trying to set it to use *IRQ4,
                  which should have fixed level/priority.</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New""> </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New"">When I execute the code noted below, the
                  interrupts are disabled properly, the vector seems set
                  and interrupts are re-enabled. But anytime I
                  ground*IRQ4 (default high) line while my example
                  program is running, I do not vector to the ISR.</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New""> </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New"">I fashioned my code using the
                  clock/network/console code as guide, and those work
                  great.</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New""> </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:11.0pt;font-family:"Courier
                  New"">Can anyone please give me a hint of what am
                  I doing wrong?</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
            </div>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <p class="MsoNormal">Not sure about any of the MCF5235 code,
            but one thing for sure that is wrong is that you must not
            call printf from an interrupt handler…<o:p></o:p></p>
        </div>
        <div>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
        <div>
          <p class="MsoNormal">Try declaring a volatile global variable
            -- increment it in the interrupt handler and print it in the
            main thread.<o:p></o:p></p>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black">-- <br>
                Eric Norum<br>
                <a moz-do-not-send="true" href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a><o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a>        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

</pre>
  </body>
</html>