<?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 MKL27 crashes when ANY interrupt occurs in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774760#M47104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running a&amp;nbsp;MKL27Z64VFM4 chip on a custom board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started a project on KDE w/ KSDK1.3 and PE, but as the chip wasn't properly supported I had to abandon that approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded the MCUXpresso&amp;nbsp;IDE and the SDK for the&amp;nbsp;MKL27Z64VFM4 chip. I installed the SDK into the IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new product using..&amp;nbsp; New / MCUXpresso IDE / New C/C++ Project. I selected the correct CPU, no board, I selected the correct package (VFM4) and some drivers. I then configured the clocks and basic Peripheral settings via the GUI:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6d5d9;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2017-12-08 at 14.13.58.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4270i837EAFC33C668D27/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-12-08 at 14.13.58.png" alt="Screen Shot 2017-12-08 at 14.13.58.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This generates code which seems sensible and compiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add the app IRQHandlers with basic code to clear the flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run it, it crashes when an IRQ occurs. My &lt;SPAN&gt;IRQ&lt;/SPAN&gt; functions are never called. I've tried TPM, UART and other IRQs and they all have the same problem- when the triggering event occurs, the PC ends up at 0x1C002228 &lt;SPAN style="text-decoration: underline;"&gt;without&lt;/SPAN&gt; touching my IRQ code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This address appears to be in the ROM space, i.e. the integrated bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw some other posts with related issues, someone changed their FOPT from 0xFF to 0x3D and it fixed their problem. My flash config code (auto generated) appears to be OK:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((used,section(".FlashConfig"))) const struct {&lt;BR /&gt;unsigned int word1;&lt;BR /&gt;unsigned int word2;&lt;BR /&gt;unsigned int word3;&lt;BR /&gt;unsigned int word4;&lt;BR /&gt;} Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF3DFE};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried changing 3D to FF, and 3B, in case the NMI was causing problems. I also checked that the runtime value in 0x40020003 matches the non-volatile value- it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also set the NMI pin to GPIO muxing, to try to make sure it's not interfering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No changes- I still bounce to&amp;nbsp;0x1C002228 when any ISR occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I could be missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's frustrating that interrupts were working fine in KDE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried re-creating the project several times, choosing&amp;nbsp;different semi-hosting settings, and creating a project by importing the "frdmkl27z_demo_testdemo_apps_adc16_low_power" demo. I get the exact same behaviour - everything works, until any ISR triggers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas would be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2017 14:26:45 GMT</pubDate>
    <dc:creator>epicedium</dc:creator>
    <dc:date>2017-12-08T14:26:45Z</dc:date>
    <item>
      <title>MKL27 crashes when ANY interrupt occurs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774760#M47104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running a&amp;nbsp;MKL27Z64VFM4 chip on a custom board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started a project on KDE w/ KSDK1.3 and PE, but as the chip wasn't properly supported I had to abandon that approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded the MCUXpresso&amp;nbsp;IDE and the SDK for the&amp;nbsp;MKL27Z64VFM4 chip. I installed the SDK into the IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new product using..&amp;nbsp; New / MCUXpresso IDE / New C/C++ Project. I selected the correct CPU, no board, I selected the correct package (VFM4) and some drivers. I then configured the clocks and basic Peripheral settings via the GUI:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6d5d9;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2017-12-08 at 14.13.58.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4270i837EAFC33C668D27/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-12-08 at 14.13.58.png" alt="Screen Shot 2017-12-08 at 14.13.58.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This generates code which seems sensible and compiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add the app IRQHandlers with basic code to clear the flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run it, it crashes when an IRQ occurs. My &lt;SPAN&gt;IRQ&lt;/SPAN&gt; functions are never called. I've tried TPM, UART and other IRQs and they all have the same problem- when the triggering event occurs, the PC ends up at 0x1C002228 &lt;SPAN style="text-decoration: underline;"&gt;without&lt;/SPAN&gt; touching my IRQ code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This address appears to be in the ROM space, i.e. the integrated bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw some other posts with related issues, someone changed their FOPT from 0xFF to 0x3D and it fixed their problem. My flash config code (auto generated) appears to be OK:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((used,section(".FlashConfig"))) const struct {&lt;BR /&gt;unsigned int word1;&lt;BR /&gt;unsigned int word2;&lt;BR /&gt;unsigned int word3;&lt;BR /&gt;unsigned int word4;&lt;BR /&gt;} Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF3DFE};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried changing 3D to FF, and 3B, in case the NMI was causing problems. I also checked that the runtime value in 0x40020003 matches the non-volatile value- it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also set the NMI pin to GPIO muxing, to try to make sure it's not interfering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No changes- I still bounce to&amp;nbsp;0x1C002228 when any ISR occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I could be missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's frustrating that interrupts were working fine in KDE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried re-creating the project several times, choosing&amp;nbsp;different semi-hosting settings, and creating a project by importing the "frdmkl27z_demo_testdemo_apps_adc16_low_power" demo. I get the exact same behaviour - everything works, until any ISR triggers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas would be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 14:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774760#M47104</guid>
      <dc:creator>epicedium</dc:creator>
      <dc:date>2017-12-08T14:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: MKL27 crashes when ANY interrupt occurs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774761#M47105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris Bird,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Please use the newest KL27 SDK code, which you can find it from this link:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Select your chip, generate the code and download it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2. Refer to the KSDK document: Getting Started with MCUXpresso SDK.pdf in folder SDK_2.3.0_FRDM-KL27Z\docs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can import the SDK_2.3.0_FRDM-KL27Z\boards\frdmkl27z\driver_examples\adc16\interrupt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is the ADC interrupt code, I can make it works, when the interrupt occur, it works OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please check this picture:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4541iB0FF2B10B3D543B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the official code at first, I have test it on my FRDM-KL27 board, it works OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 02:34:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774761#M47105</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-12-11T02:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: MKL27 crashes when ANY interrupt occurs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774762#M47106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Kerry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to resolve the issue myself - I discovered that some of the flash bootloader settings are quite sticky.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that on a new MKL27 chip even if you change the bootsel settings and reset lots of times, certain bootup settings (such as vector table offset) stay as per factory settings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After some hard power cycles the issues go away completely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 20:31:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774762#M47106</guid>
      <dc:creator>epicedium</dc:creator>
      <dc:date>2017-12-14T20:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: MKL27 crashes when ANY interrupt occurs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774763#M47107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris Bird,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for your updated information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please check my post, maybe it is useful to you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-332389"&gt;Problem Analysis and solutions for booting from ROM BOOTLOADER in KL series&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 05:47:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKL27-crashes-when-ANY-interrupt-occurs/m-p/774763#M47107</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-12-18T05:47:22Z</dc:date>
    </item>
  </channel>
</rss>

