<?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: K60 Interrupt Priority in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578075#M13232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. That helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2016 20:53:23 GMT</pubDate>
    <dc:creator>davidzhou</dc:creator>
    <dc:date>2016-09-01T20:53:23Z</dc:date>
    <item>
      <title>K60 Interrupt Priority</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578073#M13230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I have K60 Tower board: MK60FN1M0VLQ12.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the reference manual, 3.2.2.1 Interrupt priority levels, and table Table 3-5. Interrupt vector assignments show the registers for each interrput. For example:&lt;/P&gt;&lt;P&gt;0x0000_013C 79 63 1 15 FTM1 Single interrupt vector for all sources&lt;/P&gt;&lt;P&gt;If I want to set the interrupt with PRIORITY 1:&lt;/P&gt;&lt;P&gt;I shall use register NVICIPR15, and&lt;/P&gt;&lt;P&gt;NVICIPR15 = 0x01;&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the code generated by PE wizard:&lt;/P&gt;&lt;P&gt;//Enable Interrupt &lt;BR /&gt;NVICIP63 = NVIC_IP_PRI63(0x80);&lt;BR /&gt;/* NVICISER1: SETENA|=0x80000000 */&lt;BR /&gt;NVICISER1 |= NVIC_ISER_SETENA(0x80000000);&lt;BR /&gt;FTM1_SC |= FTM_SC_TOIE_MASK;&lt;BR /&gt;_int_install_isr(LDD_ivIndex_INT_FTM1, FC1_OnOverflow, NULL );&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why use NVICIP63 = NVIC_IP_PRI63(0x80); ?&lt;/P&gt;&lt;P&gt;what means to 0x80?&lt;/P&gt;&lt;P&gt;IPR registers contains 4 bits as stated in the section 3.2.2.1 Interrupt priority levels.&lt;/P&gt;&lt;P&gt;I am a little confused. What are priority levels (0-15 with 0 as highest priority?) or priorities from 0 - 0xFF ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 19:24:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578073#M13230</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2016-08-31T19:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Interrupt Priority</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578074#M13231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;- Which version of IDE do you used ? I used the CW 10.6.4, when i set the FTM1 priority to&lt;/P&gt;&lt;P&gt;"1" , the generated code is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; /* NVICIP63: PRI63=0x10 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; NVICIP63 = NVIC_IP_PRI63(0x10);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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/4345i85B3A8303BF8B4DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The result is right .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- For this device ,&amp;nbsp; one byte(8 bit) support one interrupt priority use the NVIC_IPR register ,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while the low 4 bits have no effect, the default data is "0000" , so only the high 4 bits indicate &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the priority .&amp;nbsp; For example , if the priority is "1", the data should be 0x10, not 0x01 .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- About "NVICIPR15" , this is the define register on ARM M4&amp;nbsp; core, while , in this chip , &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;it doesn't defined as this name .&amp;nbsp; As we know , on NVICIPR register includes 4 bytes , &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4415i7C7855C081E48BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;in this chip , defined all the bytes :&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4538i848C42417E466D73/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;From the RM of K60, we can see FTM1&amp;nbsp; IRQ is 63, so the result is &amp;nbsp; NVICIP63 = NVIC_IP_PRI63(0x10);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Does this can helps you ?&lt;/EM&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&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>Thu, 01 Sep 2016 07:10:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578074#M13231</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-09-01T07:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Interrupt Priority</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578075#M13232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. That helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David Zhou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 20:53:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/K60-Interrupt-Priority/m-p/578075#M13232</guid>
      <dc:creator>davidzhou</dc:creator>
      <dc:date>2016-09-01T20:53:23Z</dc:date>
    </item>
  </channel>
</rss>

