<?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>Processor Expert SoftwareのトピックRe: KL05Z4 issue when setting interrupt priority with Processor expert</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639031#M3979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe&amp;nbsp;it&amp;nbsp;can help you that you can fix the wrong bit position in the header file&amp;nbsp;permanently in your installation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you are using Processor Expert project without SDK, you can find the header file&amp;nbsp;in {KDS 3.2.0}\eclipse\ProcessorExpert\lib\Kinetis\iofiles\MKL05Z4.h&lt;/LI&gt;&lt;LI&gt;If you are using Processor Expert project with SDK 1.3, you can find the header files in {SDK 1.3}\platform\devices\MKL05Z4\include\MKL05Z4.h&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After you change the file, new projects will use fixed header. For exisitng projects,&amp;nbsp;if you use linked project mode then&amp;nbsp;you need only to refresh your workspace to update the file or in case of standalone project mode&amp;nbsp;you have to regenerate the project&amp;nbsp;to update the header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jan 2017 16:09:13 GMT</pubDate>
    <dc:creator>Lukas_Heczko</dc:creator>
    <dc:date>2017-01-06T16:09:13Z</dc:date>
    <item>
      <title>KL05Z4 issue when setting interrupt priority with Processor expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639028#M3976</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;When I try to set interrupt priority PORTB interrupt priority set to 3 (lowest), following piece of code is generated in Cpu.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_IPR7 = (uint32_t)((NVIC_IPR7 &amp;amp; (uint32_t)~(uint32_t)(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_IP_PRI_31(0x3F) |&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_IP_PRI_30(0x7F)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )) | (uint32_t)(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_IP_PRI_31(0xC0) |&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_IP_PRI_30(0x80)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this basically means that the value of the register should be written as 0xC0800000 but the NVIC_IP_PRI_31 macro is incorrectly defined in MKL05Z4.h as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define NVIC_IP_PRI_31_MASK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xC0000000u&lt;BR /&gt;#define NVIC_IP_PRI_31_SHIFT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;BR /&gt;#define NVIC_IP_PRI_31(x)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (((uint32_t)(((uint32_t)(x))&amp;lt;&amp;lt;NVIC_IP_PRI_31_SHIFT))&amp;amp;NVIC_IP_PRI_31_MASK)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, it shifts the value left by 30 instead of 24 bits. This produces an incorrect value in the NVIC registers, and the interrupt priority is not set properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that either the value that is passed to the macro should be 0x03 instead of 0xC0, or the macro shift should be 24 instead of 30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known bug in the processor expert?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 19:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639028#M3976</guid>
      <dc:creator>srdjanstokic</dc:creator>
      <dc:date>2016-11-07T19:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: KL05Z4 issue when setting interrupt priority with Processor expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639029#M3977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/egoodii"&gt;egoodii&lt;/A&gt;&amp;nbsp; I understand how priorities in ARM cores work, but I'm trying to say that in the aforementioned example when I try to set priority 3 to a PORTB interrupt, Processor Expert pre-shifts the priority level up by 6 bits and generates C0.&lt;/P&gt;&lt;P&gt;Afterward, this number is passed to a macro NVIC_IP_PRI_31(0xC0), it gets upshifted again by 30 bits.&lt;/P&gt;&lt;P&gt;This produces 0x30 0000 0000 which is clearly incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct way would be to do NVIC_IP_PRI_31(0x03), which when upshifted would produce 0xC000 0000 which is a correct value (top 2 bits are set). I don't know why is PE doing this pre-shifting, but the resulting code is just invalid. It should leave the set value as-is and pass this to a Macro without doing the shifting.&lt;/P&gt;&lt;P&gt;Alternatively the shift value in the macro should be changed from 30 to 24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a quick test and generated a PE project for KL02Z8, which is an identical ARM M0 core, and the value in the MKL02Z08.h file is:&lt;/P&gt;&lt;P&gt;#define NVIC_IP_PRI_31_SHIFT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it's definitely only a problem with MKL05Z4.h file.&amp;nbsp; I'll try to report this to PE guys somehow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 23:05:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639029#M3977</guid>
      <dc:creator>srdjanstokic</dc:creator>
      <dc:date>2016-11-07T23:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: KL05Z4 issue when setting interrupt priority with Processor expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639030#M3978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for reporting of this issue. I have been able to reproduce it and I have reported this issue to the responsible development team. They will fix it in a next release.&lt;/P&gt;&lt;P&gt;In the meantime, use the workaround you have described above (modification of the NVIC_IP_PRI_31_SHIFT macro value&amp;nbsp;in the MKL05Z4.h file), please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Marek Neuzil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 07:54:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639030#M3978</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2016-11-21T07:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: KL05Z4 issue when setting interrupt priority with Processor expert</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639031#M3979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe&amp;nbsp;it&amp;nbsp;can help you that you can fix the wrong bit position in the header file&amp;nbsp;permanently in your installation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you are using Processor Expert project without SDK, you can find the header file&amp;nbsp;in {KDS 3.2.0}\eclipse\ProcessorExpert\lib\Kinetis\iofiles\MKL05Z4.h&lt;/LI&gt;&lt;LI&gt;If you are using Processor Expert project with SDK 1.3, you can find the header files in {SDK 1.3}\platform\devices\MKL05Z4\include\MKL05Z4.h&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After you change the file, new projects will use fixed header. For exisitng projects,&amp;nbsp;if you use linked project mode then&amp;nbsp;you need only to refresh your workspace to update the file or in case of standalone project mode&amp;nbsp;you have to regenerate the project&amp;nbsp;to update the header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 16:09:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/KL05Z4-issue-when-setting-interrupt-priority-with-Processor/m-p/639031#M3979</guid>
      <dc:creator>Lukas_Heczko</dc:creator>
      <dc:date>2017-01-06T16:09:13Z</dc:date>
    </item>
  </channel>
</rss>

