<?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 Re: Modifying ISR return address ? (Cortex M0) in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528496#M970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Fri May 18 08:55:02 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't do that. Looks like you have some bad conceptual error in your program.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:14:01 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:14:01Z</dc:date>
    <item>
      <title>Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528494#M968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ArneB on Fri May 18 04:38:57 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I modify the return address of a Cortex M0 Interrupt Service Routine ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know, it's a very ugly and not recommended programming style (shame on me... ;)), nevertheless due to very tight timing and other special requirements in my application I would like to jump to a different program location and not to the originating program counter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I understand the ISR push its program counter (PC) onto the stack. After the ISR finishes, it pops it back to the PC. Does anybody know, how i can modify this sequence in LPCXpresso ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528494#M968</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528495#M969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri May 18 06:21:21 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Wild guess: SP - 0x18 (which means SP + 0x18, since it's counting down):eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528495#M969</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528496#M970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Fri May 18 08:55:02 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't do that. Looks like you have some bad conceptual error in your program.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528496#M970</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528497#M971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ArneB on Fri May 18 09:13:28 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@gbm: I know it is really a dirty hack (i have done it the last time with the 6510 CPU in my C64... *sigh* long time ago...), but i have a very unusual and non-standard application. And for this special case modifying the ISR return address is the best solution resulting in the best/needed performance - believe me... :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528497#M971</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528498#M972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Fri May 18 11:54:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If your main task is so unimportant that it may be aborted any time, maybe you don't need it at all ;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't believe there is any real need for doing what you are planning to do. I would advise to rethink your design.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528498#M972</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528499#M973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by OXO on Sat May 19 04:31:59 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;+1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In over 30 years of embedded system design, I've never needed to do this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528499#M973</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528500#M974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by atomicdog on Sat May 19 15:05:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: ArneB&lt;/STRONG&gt;&lt;BR /&gt;How can I modify the return address of a Cortex M0 Interrupt Service Routine ?&lt;BR /&gt;&lt;BR /&gt;I know, it's a very ugly and not recommended programming style (shame on me... ;)), nevertheless due to very tight timing and other special requirements in my application I would like to jump to a different program location and not to the originating program counter.&lt;BR /&gt;As far as I understand the ISR push its program counter (PC) onto the stack. After the ISR finishes, it pops it back to the PC. Does anybody know, how i can modify this sequence in LPCXpresso ?&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;I believe you need to modify the Link register (LR).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528500#M974</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying ISR return address ? (Cortex M0)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528501#M975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat May 19 15:43:30 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: atomicdog&lt;/STRONG&gt;&lt;BR /&gt;I believe you need to modify the Link register (LR).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: atomicdog&lt;/STRONG&gt;&lt;BR /&gt;I believe you need to modify the Link register (LR).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LR&amp;nbsp; is pushed on stack, so you can change it in ISR after reading SP and&amp;nbsp; adding 0x18 (of course before ISR is pushing registers on stack).&amp;nbsp; Writing back a new uint32 and function is returning to this address :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:14:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modifying-ISR-return-address-Cortex-M0/m-p/528501#M975</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:14:04Z</dc:date>
    </item>
  </channel>
</rss>

