<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックAtomic Read/Write of SR</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Atomic-Read-Write-of-SR/m-p/179501#M7255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the best way to perform the following operations in an atomic manner: ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Read current value for SR[I] and retain it so that it can be restored later&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Set SR[I] to some specified value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I do not wish to change any of the SR bits other than those associated with SR[I].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hoping that there is an easier way to do this than to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Call STRLDSR with a value of 0x2700 (thus disabling interrupts)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Pop the SR that STRLDSR pushed on to the stack&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Modify bits 8-10 of the popped value to match the desired SR[I]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Set SR to the modified value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2008 23:45:26 GMT</pubDate>
    <dc:creator>BTaylor</dc:creator>
    <dc:date>2008-08-12T23:45:26Z</dc:date>
    <item>
      <title>Atomic Read/Write of SR</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Atomic-Read-Write-of-SR/m-p/179501#M7255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the best way to perform the following operations in an atomic manner: ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Read current value for SR[I] and retain it so that it can be restored later&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Set SR[I] to some specified value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I do not wish to change any of the SR bits other than those associated with SR[I].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hoping that there is an easier way to do this than to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Call STRLDSR with a value of 0x2700 (thus disabling interrupts)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Pop the SR that STRLDSR pushed on to the stack&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Modify bits 8-10 of the popped value to match the desired SR[I]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Set SR to the modified value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 23:45:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Atomic-Read-Write-of-SR/m-p/179501#M7255</guid>
      <dc:creator>BTaylor</dc:creator>
      <dc:date>2008-08-12T23:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Atomic Read/Write of SR</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Atomic-Read-Write-of-SR/m-p/179502#M7256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;depending on the processor you use, did you have a look at the STLDSR instruction ?&lt;BR /&gt;This instruction is only available on ISA_A+ and ISA_C instruction sets. For further information you can look into the Coldfire Programmer's Ref. Manual.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&amp;nbsp;stzari&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 18:34:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Atomic-Read-Write-of-SR/m-p/179502#M7256</guid>
      <dc:creator>stzari</dc:creator>
      <dc:date>2008-08-13T18:34:49Z</dc:date>
    </item>
  </channel>
</rss>

