<?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: Kinetis and FreeRTOS in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429551#M3689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The RTOS should run with the lowest interrupt priority, so 3 is fine.&lt;/P&gt;&lt;P&gt;Just to be sure: after you made the changes in the settings, have you regenerated the Processor Expert code and rebuilt your application before downloading/debugging?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are a few other things:&lt;/P&gt;&lt;P&gt;- it could be that you have some other dangling pointers/etc which corrupt your data structure?&lt;/P&gt;&lt;P&gt;- other than that, and I cannot promise anything: does your project run on a FRDM-KL46Z board? If so, you might send it to me and I could have a look?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2015 19:37:43 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2015-06-26T19:37:43Z</dc:date>
    <item>
      <title>Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429541#M3679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well despite all my best efforts, I am now convinced that the port of FreeRTOS with ProcessorExpert is not correct.&amp;nbsp; I could go into the gruesome details of what I am seeing, but I would rather just poll the community and ask if anyone has had better success with using FreeRTOS with KDS?&amp;nbsp; I have tons of experience with FreeRTOS and I know the kernel is fine, it is widely deployed.&amp;nbsp; I also *think* I know what I am doing with implementing a FreeRTOS-base program.&amp;nbsp; But when a task variable is getting corrupted by merely the action of passing it via a queue, and I have the task stack depth to 2K with hardly any deep calls, something ain't right.&amp;nbsp; The tasks I have do not do anything, but receive this message and pass it along.&amp;nbsp; I am actually at a lost to the cause, but all ideas welcome....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 03:40:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429541#M3679</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-25T03:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429542#M3680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;Sorry I have been very frustrated with this dev env. that I forgot my normal details:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;FreeRTOS Version : 8.0.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;configAssert has been defined&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;heap size set to 16384&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;total number of task allowed : 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;total defined 3 with configMINIMAL_STACK_SIZE at 128 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;total queues defined 2 with depth of about 5 small elements&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;memory allocation scheme is heap_1.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;running KDS 3.0.0 on Win7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;using tickless idle mode as we are sleeping the processor until it is woken up with an accelerometer generated interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: sans-serif; font-size: 13px;"&gt;there are a few FreeRTOS timers in use and one mutex.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 19:27:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429542#M3680</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-25T19:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429543#M3681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using FreeRTOS V8.2.0 with KDS 2.0.0, KSDK 1.1.0 and updated toolchain from ARM. However I chose not to use PE and port FreeRTOS from scratch. Reasons:&lt;/P&gt;&lt;P&gt;1. IMHO processor expert is a buggy and unnecessary obfuscation tool.&lt;/P&gt;&lt;P&gt;2. Provided port of FreeRTOS was outdated and poorly integrated.&lt;/P&gt;&lt;P&gt;Anyway, porting FreeRTOS from sources was a surprisingly trivial task. The only issue I ran into was interrupt priorities. That warning in FreeRTOS source is there for a reason. Poor choice in setting priorities resulted in some really weird crashes.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 20:40:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429543#M3681</guid>
      <dc:creator>sergeisharonov</dc:creator>
      <dc:date>2015-06-25T20:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429544#M3682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi William,&lt;/P&gt;&lt;P&gt;sorry to hear that you have problems. I'm using FreeRTOS intensively, and hopefully I can give you hopefully some ideas.&lt;/P&gt;&lt;P&gt;To me, it sounds like a stack overflow issue. I recommend that you increase configMINIMAL_STACK_SIZE say to 200, or maybe even 300.&lt;/P&gt;&lt;P&gt;Your heap size should allow you that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, if not already done, do you have stack overflow check (configCHECK_FOR_STACK_OVERFLOW) turned on? If not, that might be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You say you are using FreeRTOS V8.0.1. The Kinetis SDK is using v8.0.0, and my McuOnEclipse (&lt;A href="https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/" title="https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/"&gt;McuOnEclipse - Browse /PEx Components at SourceForge.net&lt;/A&gt;) is at V8.2.0. So I'm wondering if you are using something different?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What processor are you using? M4 or M4F? Then you need to make sure you that configLIBRARY_LOWEST_INTERRUPT_PRIORITY is set correctly, see &lt;A href="http://www.freertos.org/RTOS-Cortex-M3-M4.html" title="http://www.freertos.org/RTOS-Cortex-M3-M4.html"&gt;RTOS for ARM Cortex-M&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last but not least: I recommend that you turn off tickless idle mode, just to keep things little bit more simple. You can turn this on later on again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 21:23:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429544#M3682</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-25T21:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429545#M3683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KDS V3.0.0 comes with the Q3_14 toolchain from ARM (launchpad), but you can easily swap it to the Q1_15 release too (I'm using the Q3_14 because its code density for my projects are better than the Q1_15 one).&lt;/P&gt;&lt;P&gt;I agree: porting FreeRTOS is rather easy, all the dependend stuff is in the port.c.&lt;/P&gt;&lt;P&gt;I have the 8.2.0 port as well here for the SDK:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KSDK/FreeRTOS_V8.2.0" title="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KSDK/FreeRTOS_V8.2.0"&gt;mcuoneclipse/Examples/KSDK/FreeRTOS_V8.2.0 at master · ErichStyger/mcuoneclipse · GitHub&lt;/A&gt; &lt;/P&gt;&lt;P&gt;And I agree: using the wrong priorities or boundaries between interrupts which are allowed to call RTOS functions and the ones which are not (configLIBRARY_LOWEST_INTERRUPT_PRIORITY) can create all kind of data or stack corruption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 21:28:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429545#M3683</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-25T21:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429546#M3684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich for the reply; I did pay close attention to the items in your list, but let me go over my configuration with you.&amp;nbsp; Firstly, I use KL46Z for processor. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the tasks I used &lt;SPAN style="color: #202020; font-family: monospace;"&gt;uxTaskGetStackHighWaterMark just to make sure I was not overflowing the stack but I did have &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #202020; font-family: monospace;"&gt;#define configCHECK_FOR_STACK_OVERFLOW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 /* 0 is disabling stack overflow. Set it to 1 for Method1 or 2 for Method2 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #202020; font-family: monospace;"&gt;set in the FreeRTOSConfig.h file.&amp;nbsp; I also set the tasks with configMINIMAL_STACK_SIZE * 3, so each task has a huge amount of stack space.&amp;nbsp; There was no indication we were even warming the stack up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #202020; font-family: monospace;"&gt;This is the setting for the interrupt levels in the FreeRTOSconfig.h file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* The lowest interrupt priority that can be used in a call to a "set priority" function. */&lt;/P&gt;&lt;P&gt;#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both interrupts in the system are set to prio level 2.&amp;nbsp; I think this is correct we need to be below configLIBRARY_LOWEST_INTERRUPT_PRIORITY, which in the ARM architecture the lower the prio number the higher the prio (please correct me if I am wrong).&amp;nbsp; Lastly I am using the FreeRTOS v8.2.0 at my home office with the same source (PE does not do well with SVN so it does not seem to update at work).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I turned off tickless mode and pretty much removed the code from the tasks.&amp;nbsp; All I allow are the interrupts to fire off a message which is passed between three tasks. The first time thru all works well, but the state information in the message is lost when the interrupt refires and the process is repeated.&amp;nbsp; So I am at a loss.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 23:05:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429546#M3684</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-25T23:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429547#M3685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great that you did that, hopefully you submitted this to the user section of ports, so the community can benefit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 23:09:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429547#M3685</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-25T23:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429548#M3686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi William,&lt;/P&gt;&lt;P&gt;Stack overflow and stack settings: that looks ok, good!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are using an ARM Cortex-M0+, the RTOS should run with the lowest priority which is 3 for that core:&lt;/P&gt;&lt;P&gt;#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&amp;nbsp; configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY should be the maxium level where you are using calls to the RTOS. As you are using interrupt level 2, this should be:&lt;/P&gt;&lt;P&gt;#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you verify this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 23:22:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429548#M3686</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-25T23:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429549#M3687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich,&lt;/P&gt;&lt;P&gt;Looks like the settings were &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58913i2244240DEE92BE15/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'll readjust to your recommendations and see if this works...!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 15:42:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429549#M3687</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T15:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429550#M3688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What should the RTOS Interrupt Priority be set to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this setting:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58901iA512870F62A6E6DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am still getting the data corruption.&amp;nbsp; I turned off the tickless idle, but nothing seems to help.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429550#M3688</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429551#M3689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The RTOS should run with the lowest interrupt priority, so 3 is fine.&lt;/P&gt;&lt;P&gt;Just to be sure: after you made the changes in the settings, have you regenerated the Processor Expert code and rebuilt your application before downloading/debugging?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are a few other things:&lt;/P&gt;&lt;P&gt;- it could be that you have some other dangling pointers/etc which corrupt your data structure?&lt;/P&gt;&lt;P&gt;- other than that, and I cannot promise anything: does your project run on a FRDM-KL46Z board? If so, you might send it to me and I could have a look?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:37:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429551#M3689</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-26T19:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429552#M3690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;P&gt;To give you a sense of what I am seeing here is the watch output of the task variable on the first pass&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58912i08CF68691E3FA50F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The task goes back to a blocked state waiting for the next message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58914i6E5439F3D4770F54/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the variable has gotten clobbered, the values should not have changed.&amp;nbsp; uxTaskGetStackHighWaterMark( NULL ) returns 204, so plenty of stack left.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:55:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429552#M3690</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T19:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429553#M3691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no I think my code is solid (famous last words!), but this is simple, I have a task which generates and a message and a task which consumes the message.&amp;nbsp; I do not know if this would run on the KL46 (this is a custom board), but we rely on the accelerometer to be at a certain angle.&amp;nbsp; However, let me see if I can simulate the message production and see if this still works...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:57:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429553#M3691</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T19:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429554#M3692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would set a watchpoint on that corrupted memory (see &lt;A href="http://mcuoneclipse.com/2014/05/17/cc-watchpoints-with-eclipse-kepler/" title="http://mcuoneclipse.com/2014/05/17/cc-watchpoints-with-eclipse-kepler/"&gt;C/C++ Watchpoints with Eclipse Kepler | MCU on Eclipse&lt;/A&gt; ) to find out what/who is writing to that location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:03:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429554#M3692</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-26T20:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429555#M3693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erich,&lt;/P&gt;&lt;P&gt;Not sure how compatible this would be to the KL46Z dev board, but we heavily leveraged this board to get the custom board built.&amp;nbsp; This program relies on a tap event from the accelerometer, so if you can get the code to run, you should be able to trap and see the problem.&amp;nbsp; Appreciate all the help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/u/80917392/ElephantTimer.zip"&gt;https://dl.dropboxusercontent.com/u/80917392/ElephantTimer.zip&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:10:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429555#M3693</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T20:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429556#M3694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;would love to, but this option is always grayed out.&amp;nbsp; I am using KDS 3.0.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:37:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429556#M3694</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-26T20:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429557#M3695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich for all the help.&amp;nbsp; The problem is definitely the interrupt level scheme, which seems a little confusing to me, but I made the OS be level 3, and all components which are ISR's and signal the OS be level 2.&amp;nbsp; This now works, as these were set at level 1 which is a crash situation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OS settings:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61028iA0953C6C0D914AF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An EINT component setting:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61029iC02E4513DF3DA517/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also used the latest component from GIT (FreeRTOS v8.2.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully other users may find this thread useful is they choose to run FreeRTOS on the Cortex-M0 Freescale processor...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 17:26:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429557#M3695</guid>
      <dc:creator>BillTheBiker</dc:creator>
      <dc:date>2015-06-29T17:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis and FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429558#M3696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now your settings look ok, with the RTOS running at the lowest level (3), and ISR's which do calls to the OS are up to level 2 max (Max SysCall Interrupt Prio). Indeed, if you have in your above configurations interrupts with level &amp;lt;2 (numerically lower) and calling OS functions, this will corrupt the OS, as outlined on FreeRTOS.org.&lt;/P&gt;&lt;P&gt;I hope this all makes sense now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 19:47:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Kinetis-and-FreeRTOS/m-p/429558#M3696</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-29T19:47:10Z</dc:date>
    </item>
  </channel>
</rss>

