<?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: Is there anything like critical section within SDK? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545203#M5593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;atomic.h attached gives the needed code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ATOMIC_BLOCK( ATOMIC_RESTORESTATE )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // protected stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2016 12:46:29 GMT</pubDate>
    <dc:creator>bobpaddock</dc:creator>
    <dc:date>2016-07-28T12:46:29Z</dc:date>
    <item>
      <title>Is there anything like critical section within SDK?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545202#M5592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is there something like windows critical section within SDK 2.0 (or a mutex/semaphore will do). I am not using any RTOS. Basically there is a function which I do not want the system to interrupt, to service anything else. I am using SDK 2.0 for KL43.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is the function shares a variable with uart callback function. So if there is a uart callback while the function is being services, the call back function changes the value and if my function is half way through processing based on initial value, when it resumes it goes crazy!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:17:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545202#M5592</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-07-28T10:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything like critical section within SDK?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545203#M5593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;atomic.h attached gives the needed code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ATOMIC_BLOCK( ATOMIC_RESTORESTATE )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // protected stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:46:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545203#M5593</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-07-28T12:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there anything like critical section within SDK?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545204#M5594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much :smileyhappy:. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 15:21:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Is-there-anything-like-critical-section-within-SDK/m-p/545204#M5594</guid>
      <dc:creator>tonymakkiel</dc:creator>
      <dc:date>2016-07-28T15:21:35Z</dc:date>
    </item>
  </channel>
</rss>

