<?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>MQX Software SolutionsのトピックRe: MQX Priorities and H/W Interrupt conflicts - Kinetis</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Priorities-and-H-W-Interrupt-conflicts-Kinetis/m-p/690006#M17472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't find your code snippet in Freescale released MQX 4.1 source package, where did you get this source or&amp;nbsp; you modified based on MQX 4.1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On cortex-M4 core based platforms, the MQX RTOS interrupt processing is designed this way. Kinetis K family MCUs support 16 hardware interrupt priority levels. Internally MQX RTOS maps even levels (0, 2, 4, ... 14 ) for MQX RTOS applications while odd levels (1, 3, ..., 15) are used internally. MQX RTOS application interrupt levels are 0 to 7, the mapping from MQX RTOS application levels 0 to 7 to hardware priority (0, 2, to 14) is implemented in the _bsp_int_init () function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2017 07:18:34 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2017-06-20T07:18:34Z</dc:date>
    <item>
      <title>MQX Priorities and H/W Interrupt conflicts - Kinetis</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Priorities-and-H-W-Interrupt-conflicts-Kinetis/m-p/690005#M17471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a scheduling / kernal problem with tasks and interrupts.... I think. I see&amp;nbsp;at infrequent times that I can't reproduce failures in services and I think the IRQ and Task priorities are wrong. I am using MQX 4.1 on a MK20dx256VLL10&amp;nbsp;core.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a place in the code where the NVIC priorities are not using the CMSIS calls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVICIP62 = (uint8_t)DEF_SPEED_RECAL_PRIORITY_FTM0; // NVICIP62: PRI62=0xB0, change FTM0 interrupt priority to 11, below USB task priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also this is defined here&lt;/P&gt;&lt;P&gt;_bsp_int_init ((IRQInterruptIndex)INT_FTM0, 4, 0, TRUE); // sets priority of interrupts, loads vector table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then the task using the results of the data collected above&lt;/P&gt;&lt;P&gt;{ge_SERVER_TSK, server_task, 2400, 9, "server_tsk", 0, 0L, 0},&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think these priorities are&amp;nbsp;not correct&amp;nbsp;set. I know that 0 - 7 are for the kernal so the task is ok, but setting the hardware in two places and one being an odd number doesn't seem correct (but I am not sure given the understanding I have of using odd priorities for H/W and even for Tasks in MQX, however does this apply when the CMSIS calls are bypassed as above)? Can anyone advise me please on the best method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I just remove the NVICIP62 register setting, since the mqx/cmsis call is setting the priority, and is this a good priority for a timer task that should run in the background but not override other irq's? I know it is all design dependent, but what I am asking is whether there is an obvious error in the above code. I have read through all the posts on the irq task priorities and still find the whole mqx, bsp shifting this... and that... and offsetting ... confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2017 16:45:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Priorities-and-H-W-Interrupt-conflicts-Kinetis/m-p/690005#M17471</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2017-06-17T16:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Priorities and H/W Interrupt conflicts - Kinetis</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Priorities-and-H-W-Interrupt-conflicts-Kinetis/m-p/690006#M17472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't find your code snippet in Freescale released MQX 4.1 source package, where did you get this source or&amp;nbsp; you modified based on MQX 4.1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On cortex-M4 core based platforms, the MQX RTOS interrupt processing is designed this way. Kinetis K family MCUs support 16 hardware interrupt priority levels. Internally MQX RTOS maps even levels (0, 2, 4, ... 14 ) for MQX RTOS applications while odd levels (1, 3, ..., 15) are used internally. MQX RTOS application interrupt levels are 0 to 7, the mapping from MQX RTOS application levels 0 to 7 to hardware priority (0, 2, to 14) is implemented in the _bsp_int_init () function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 07:18:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Priorities-and-H-W-Interrupt-conflicts-Kinetis/m-p/690006#M17472</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-06-20T07:18:34Z</dc:date>
    </item>
  </channel>
</rss>

