<?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 Get stack pointer of interrupted task in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663380#M17298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to get the address of the instruction that will be executed first upon a return from interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, we would like to know the address of the last executed instruction before SWT watchdog is trigger. This address is saved in a part of RAM that is not initialized at startup and thus can be read by the application during initialization. But since MQX switches stack for interrupt, I'm wondering if there is a way to read the stack of the task that was interrupted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2016 15:40:04 GMT</pubDate>
    <dc:creator>hbouch</dc:creator>
    <dc:date>2016-11-15T15:40:04Z</dc:date>
    <item>
      <title>Get stack pointer of interrupted task</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663380#M17298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to get the address of the instruction that will be executed first upon a return from interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, we would like to know the address of the last executed instruction before SWT watchdog is trigger. This address is saved in a part of RAM that is not initialized at startup and thus can be read by the application during initialization. But since MQX switches stack for interrupt, I'm wondering if there is a way to read the stack of the task that was interrupted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663380#M17298</guid>
      <dc:creator>hbouch</dc:creator>
      <dc:date>2016-11-15T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get stack pointer of interrupted task</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663381#M17299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the ARM architecture reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/10269iB74E877D89C21B0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is for arm,I think the concept is similar to other processors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 06:05:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663381#M17299</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-11-22T06:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get stack pointer of interrupted task</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663382#M17300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. However, R13 and R14 will contain the SP and LR of the ISR. The LR should contain the return address to _int_kernel_isr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure there is a way of reading the saved registers (in the kernel data maybe ?) to see the value of R13 and R14 registers but how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 11:55:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Get-stack-pointer-of-interrupted-task/m-p/663382#M17300</guid>
      <dc:creator>hbouch</dc:creator>
      <dc:date>2016-11-25T11:55:08Z</dc:date>
    </item>
  </channel>
</rss>

