<?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: Confusion regarding thread mode in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393145#M13173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're using MQX 4.1&lt;/P&gt;&lt;P&gt;Would you be kind enough to answer my doubts above ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2015 04:56:27 GMT</pubDate>
    <dc:creator>reubennoronha</dc:creator>
    <dc:date>2015-06-04T04:56:27Z</dc:date>
    <item>
      <title>Confusion regarding thread mode</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393143#M13171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I've written a bootloader for my custom board with a Kinetis K61.&lt;/P&gt;&lt;P&gt;The bootloader runs on MQX and has USB + MFS functionality(I extended the mfs_usb example to include more code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The application(formware to be upgraded) too has an OS(RTXC)&lt;/P&gt;&lt;P&gt;The bootloader writes the Application to DDR, then jumps to a specific location in the DDR and starts executing from there.&lt;/P&gt;&lt;P&gt;The problem I'm facing is that the application code contains the following 2 lines of code in a function called Init_OS() :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define THREAD_PRIVELEGED (0ul &amp;lt;&amp;lt; 0)&lt;/P&gt;&lt;P&gt;#define TSTACK_PROCESS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1ul &amp;lt;&amp;lt; 1)&lt;/P&gt;&lt;P&gt;Q__set_PSP(Q__get_MSP() );&lt;/P&gt;&lt;P&gt;Q__set_CONTROL(THREAD_PRIVILEGED | TSTACK_PROCESS);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On exiting the function that contains the above code, I get an exception(either undefined instruction or usage fault)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment out these 2 lines, there are no issues faced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) What could be the issue ?&lt;/P&gt;&lt;P&gt;2) Is it possible that MQX(which is in the bootloader) has already initialized the thread mode and hence wont allow the application OS to make changes ?&lt;/P&gt;&lt;P&gt;3) Is there a work around ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 11:30:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393143#M13171</guid>
      <dc:creator>reubennoronha</dc:creator>
      <dc:date>2015-05-25T11:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion regarding thread mode</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393144#M13172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Reuben ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which MQX version are you using??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 22:15:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393144#M13172</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-06-03T22:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion regarding thread mode</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393145#M13173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're using MQX 4.1&lt;/P&gt;&lt;P&gt;Would you be kind enough to answer my doubts above ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 04:56:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393145#M13173</guid>
      <dc:creator>reubennoronha</dc:creator>
      <dc:date>2015-06-04T04:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion regarding thread mode</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393146#M13174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Reuben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the below thread&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/356388"&gt;In MQX are all the threads in privileged mode ? or do we need to enable them in privilege mode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol &lt;BR /&gt; &lt;BR /&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, 08 Jun 2015 22:21:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Confusion-regarding-thread-mode/m-p/393146#M13174</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-06-08T22:21:06Z</dc:date>
    </item>
  </channel>
</rss>

