<?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 Disabling NMI using the FOPT register (on KL17). in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392350#M21392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming what I need to do to fix my problem is to "Disabling NMI before execution".&amp;nbsp; But if in reading this you see my true problem, please do speak up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a KL17 in a situation where I need a GPIO pin more than the NMI.&amp;nbsp; So I reconfigure pin PTA4 for GPIO.&amp;nbsp; But when I enable all interrupts (and this only happens when I am debugging) my debugging session "goes south":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Wed Nov 04, 2015 11:18:57: The stack pointer for stack 'CSTACK' (currently 0x20000538) is outside the stack range (0x20002C00 to 0x20003000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...why this (evidently) dose not happen when I am not debugging (the program sends messages to the UART port and communicates both ways over the SPI port) is a mystery to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am assuming disabling NMI will fix this.&amp;nbsp; Even though I think there is another problem lurking in the wings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect changes can be made to the &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;startup_MKL17Z644.s &lt;/SPAN&gt;file to do this.&amp;nbsp; But after trying with no positive results (maybe a big endian problem?) we decided it a bit risky to continue with out understanding how this file is laid out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 16:07:36 GMT</pubDate>
    <dc:creator>rickstuart</dc:creator>
    <dc:date>2015-11-06T16:07:36Z</dc:date>
    <item>
      <title>Disabling NMI using the FOPT register (on KL17).</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392350#M21392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am assuming what I need to do to fix my problem is to "Disabling NMI before execution".&amp;nbsp; But if in reading this you see my true problem, please do speak up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a KL17 in a situation where I need a GPIO pin more than the NMI.&amp;nbsp; So I reconfigure pin PTA4 for GPIO.&amp;nbsp; But when I enable all interrupts (and this only happens when I am debugging) my debugging session "goes south":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Wed Nov 04, 2015 11:18:57: The stack pointer for stack 'CSTACK' (currently 0x20000538) is outside the stack range (0x20002C00 to 0x20003000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...why this (evidently) dose not happen when I am not debugging (the program sends messages to the UART port and communicates both ways over the SPI port) is a mystery to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am assuming disabling NMI will fix this.&amp;nbsp; Even though I think there is another problem lurking in the wings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect changes can be made to the &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;startup_MKL17Z644.s &lt;/SPAN&gt;file to do this.&amp;nbsp; But after trying with no positive results (maybe a big endian problem?) we decided it a bit risky to continue with out understanding how this file is laid out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 16:07:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392350#M21392</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-11-06T16:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI before execution (on KL17)...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392351#M21393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About disable NMI function, please check below thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/498526"&gt;Re: Disable NMI_b pin/interrupt KL04Z?&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you enlarge the stack memory size and check if the issue still there?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&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, 09 Nov 2015 07:50:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392351#M21393</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-11-09T07:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI before execution (on KL17)...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392352#M21394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That other thread uses Processor Expert.&amp;nbsp; We didn't generate our code using Processor Expert.&amp;nbsp; So I would rather not start over.&amp;nbsp; Rather I would like to work with what I have so as to understand what needs to be done to fix this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm not sure if this is a problem with the stack memory size.&amp;nbsp; An IAR employee asked the same question (enlarge the stack memory size).&amp;nbsp; I believe this is something that is usually done from withing Workbench.&amp;nbsp; However, my copy of the project and my version of Workbench does not offer this "change stack memory size" option.&amp;nbsp; It is likely that the Workbench configuration file has been manually updated (maybe not even by me (i.e. I was given the configuration file this way)) and Workbench is now confused and refuses to make any further adjustments.&amp;nbsp; If you can describe a manual way to editing and change the file - that would be appreciated.&amp;nbsp; I assume this has to deal with *.icf files.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I think the underlying problem here is not being able to get the Freescale NMI under control.&amp;nbsp; That is, not being able to turn it off from the get go!&amp;nbsp; I have tried over and over to change a section of code from a file called startup_MKL17Z644.s:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;SECTION FlashConfig:CODE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;__FlashConfig&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; DCD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFFFFFFFF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; DCD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFFFFFFFF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; DCD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFFFFFFFF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; DCD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFFFF39DFE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;__FlashConfig_End&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;If have tried changing "DCD 0xFFFF3DFE" to "DCD 0xFFFF39FE" to "DCD 0xFBFF3DFE" to "DCD 0xFFFB3DFE" to "DCD 0xFFFF3DFA" ... But nothing is making a difference.&amp;nbsp; I am still not able to run my code while the debugger is engaged and there is no 1K ohm pull up resistor on the NMI pin.&amp;nbsp; Again, the code runs fine with or with out the debugger engaged if there is a 1K ohm pull up resistor on the NMI pin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 21:47:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392352#M21394</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-11-09T21:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI before execution (on KL17)...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392353#M21395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to disable the NMI by changing the FOPT byte for several days now.&amp;nbsp; The generated image must have the correct FOPT byte because it causes a warning every time I try to burn it into the processor using IAR Embedded Workbench IDE.&amp;nbsp; The warning says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tue Nov 10, 2015 17:45:42: Warning: Target inconsistency detected at Memory address 0x0000040D &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, since there are no responses here in a Freescale forum - could this possibly an IAR problem?&amp;nbsp; Maybe even an ARM problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 00:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392353#M21395</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-11-11T00:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI using the FOPT register (on KL17).</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392354#M21396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is IAR - there is a solution at &lt;A href="https://community.nxp.com/thread/311660"&gt;Using IAR EWARM to program flash configuration field&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flash configuratin settings that I use for the KLx7 are&lt;/P&gt;&lt;P&gt;00 00 00 00 00 00 00 00 ff ff ff ff &lt;STRONG&gt;be 1b&lt;/STRONG&gt; ff ff&lt;/P&gt;&lt;P&gt;and the NMI is disabled when loading with a tool that doesn't use its own value.&lt;/P&gt;&lt;P&gt;With IAR it programs 0xfe and 0x3d at the two fields of main interest by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For general development work you can just set the values that you want in its "board file".&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;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/kinetis.html" rel="nofollow"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;KL27: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/kinetis/FRDM-KL27Z.html" rel="nofollow"&gt;http://www.utasker.com/kinetis/FRDM-KL27Z.html&lt;/A&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/kinetis/Capuccino-KL27/Capuccino-KL27.html" rel="nofollow"&gt;http://www.utasker.com/kinetis/Capuccino-KL27/Capuccino-KL27.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;:smileyinfo: Out-of-the-box support for 46 Kinetis boards and 10 IDEs (&lt;EM&gt;460 combinations from a single code source with no porting required&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:03:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392354#M21396</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-11-11T02:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI using the FOPT register (on KL17).</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392355#M21397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When IAR warns you the location at 0x40D is inconsistent, it means the data at addess 0x40D read out of flash during the verification, does not match the data in your application image.&amp;nbsp; So you have not disabled the NMI in this case.&amp;nbsp; With IAR, this inconsistency is because by default, IAR writes safe values to FOPT and FSEC.&amp;nbsp; But you can force IAR to program those locations as you have in the image.&amp;nbsp; See &lt;A href="https://community.nxp.com/message/347605"&gt;Using IAR EWARM to program flash configuration field&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using the debugger, you can verify what's actually stored in FOPT using the debugger.&amp;nbsp; Using the Memory view to look at location 0x40D.&amp;nbsp; The data in location 0x40D is also copied to the FTFA_FOPT register.&amp;nbsp; So you can also use the debugger to look at the FTFA_FOPT register.&amp;nbsp; I suspect you will find those locations do not match what you have built in your application image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have the location 0x40D in flash matching what you have set in your application image, then you should see the NMI feature disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 17:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392355#M21397</guid>
      <dc:creator>dereksnell</dc:creator>
      <dc:date>2015-11-12T17:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling NMI using the FOPT register (on KL17).</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392356#M21398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for you help Derek.  The tricky bit now is to grab the right  &lt;/P&gt;&lt;P&gt;IAR configuration files to place into our source code control.  I  &lt;/P&gt;&lt;P&gt;think they are the :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;Derek Snell   &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;replied to the discussion&lt;/P&gt;&lt;P&gt;"Disabling NMI using the FOPT register (on KL17)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To view the discussion, visit:   &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/587051?et=watches.email.thread#587051" target="test_blank"&gt;https://community.freescale.com/message/587051?et=watches.email.thread#587051&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 21:00:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Disabling-NMI-using-the-FOPT-register-on-KL17/m-p/392356#M21398</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-11-12T21:00:14Z</dc:date>
    </item>
  </channel>
</rss>

