<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic calling ISRs...? in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358372#M6745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is one of those areas where it would be really helpful to subvert the way things are designed to work:&amp;nbsp; In Codewarrior 6.3, is it possible to call an Interrupt Service Routine?&amp;nbsp; I can hear people cringing already, but let me explain.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Coldfire V1 project to which I have just added embedded End Of Line test code.&amp;nbsp; While the EOL tests are running of course regular operations need to be suspended and interrupts disabled.&amp;nbsp; In some parts of the test, the functionality already coded in an ISR is needed.&amp;nbsp; I have tried to call the ISR directly, which works fine right up to the ISR's RTE instruction, which results in a trap instruction.&amp;nbsp; Or in other words, bad news.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see from the RTE instruction description, to make a simple call to an ISR will require (at best) some manual stack loading prior to the call in order for the return address to be found, but is there a better way to do this?&amp;nbsp; Or even an approved way to do this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I could just copy the ISR contents to a regular function and call that, but there's a space waste involved, plus the maintenance problem to keep the two code sections coordinated.&amp;nbsp; Or perhaps have the functionality in one regular function which is called from both the ISR and from the EOL test?&amp;nbsp; That's probably my fall back, but that ISR took a lot of tuning, and I'd prefer not to mess with it...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 12:43:53 GMT</pubDate>
    <dc:creator>dougpaulsen</dc:creator>
    <dc:date>2014-10-28T12:43:53Z</dc:date>
    <item>
      <title>calling ISRs...?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358372#M6745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is one of those areas where it would be really helpful to subvert the way things are designed to work:&amp;nbsp; In Codewarrior 6.3, is it possible to call an Interrupt Service Routine?&amp;nbsp; I can hear people cringing already, but let me explain.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Coldfire V1 project to which I have just added embedded End Of Line test code.&amp;nbsp; While the EOL tests are running of course regular operations need to be suspended and interrupts disabled.&amp;nbsp; In some parts of the test, the functionality already coded in an ISR is needed.&amp;nbsp; I have tried to call the ISR directly, which works fine right up to the ISR's RTE instruction, which results in a trap instruction.&amp;nbsp; Or in other words, bad news.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see from the RTE instruction description, to make a simple call to an ISR will require (at best) some manual stack loading prior to the call in order for the return address to be found, but is there a better way to do this?&amp;nbsp; Or even an approved way to do this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I could just copy the ISR contents to a regular function and call that, but there's a space waste involved, plus the maintenance problem to keep the two code sections coordinated.&amp;nbsp; Or perhaps have the functionality in one regular function which is called from both the ISR and from the EOL test?&amp;nbsp; That's probably my fall back, but that ISR took a lot of tuning, and I'd prefer not to mess with it...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 12:43:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358372#M6745</guid>
      <dc:creator>dougpaulsen</dc:creator>
      <dc:date>2014-10-28T12:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: calling ISRs...?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358373#M6746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I have answered my own question.&amp;nbsp; RTE stands for ReTurn from Exception.&amp;nbsp; The programmers manual states if this instruction is encountered when not in a Supervisor State, a privilege violation exception occurs - which just happens to be what I'm seeing when I call my ISR.&amp;nbsp; Amazing, isn't it?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps my question should be reformulated to as can you generate an exception (in my case, an IRQ) from within software?&amp;nbsp; Is this a job for a software interrupt - and does Codewarrior 6.3 support software interrupts...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 13:41:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358373#M6746</guid>
      <dc:creator>dougpaulsen</dc:creator>
      <dc:date>2014-10-28T13:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: calling ISRs...?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358374#M6747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems you want to simulate an ISR to debug the ISR function.&lt;/P&gt;&lt;P&gt;The MCU V6.3 includes several components you can use in this case.&lt;/P&gt;&lt;P&gt;I've found a post with similar question.&lt;/P&gt;&lt;P&gt;Please have a look to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://community.nxp.com/message/48534"&gt;Visualization Tools - True Time Simulator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal Irrle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:24:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-ISRs/m-p/358374#M6747</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-11-03T14:24:01Z</dc:date>
    </item>
  </channel>
</rss>

