<?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>MPC5xxx中的主题 Re: Disable Interrupts and Enable Interrupts</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046037#M15689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;Sorry i forgot to mention about compiler.&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;GCC compiler&lt;/STRONG&gt; and&amp;nbsp;IDE is &lt;STRONG&gt;S32DS Power v2.1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to disable and enable&lt;STRONG&gt; internal as well external interrupts&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Jul 2020 08:56:47 GMT</pubDate>
    <dc:creator>Deepak1</dc:creator>
    <dc:date>2020-07-18T08:56:47Z</dc:date>
    <item>
      <title>Disable Interrupts and Enable Interrupts</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046035#M15687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using MPC5748G micrcontroller.&lt;/P&gt;&lt;P&gt;During executing some operations I want to disable interrupts and then want enable interrupts. Below is the code I that i am using for the same.&lt;/P&gt;&lt;P&gt;Please let me know is this correct implementation&amp;nbsp; ? you can also suggest me better method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Disable Interrupt */&lt;BR /&gt;#define DISABLE_INTERRUPT \&lt;BR /&gt; __asm volatile("mfmsr %0" : "=r" (msr) :);\&lt;BR /&gt; if (msr &amp;amp; (uint32)0x00008000UL)\&lt;BR /&gt; __asm(" wrteei 0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Enable Interrupt */&lt;BR /&gt;#define ENABLE_INTERRUPT \&lt;BR /&gt; if (msr &amp;amp; (uint32)0x00008000UL)\&lt;BR /&gt; __asm(" wrteei 1");&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 18:03:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046035#M15687</guid>
      <dc:creator>Deepak1</dc:creator>
      <dc:date>2020-07-14T18:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Interrupts and Enable Interrupts</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046036#M15688</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 do not have any knowledge on your compiler, but yes the wrteei instruction enable/disable external interrupt processing to core.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;PS: Execution of this instruction is privileged and restricted to supervisor mode only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 05:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046036#M15688</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-07-15T05:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Interrupts and Enable Interrupts</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046037#M15689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;Sorry i forgot to mention about compiler.&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;GCC compiler&lt;/STRONG&gt; and&amp;nbsp;IDE is &lt;STRONG&gt;S32DS Power v2.1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to disable and enable&lt;STRONG&gt; internal as well external interrupts&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2020 08:56:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046037#M15689</guid>
      <dc:creator>Deepak1</dc:creator>
      <dc:date>2020-07-18T08:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Interrupts and Enable Interrupts</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046038#M15690</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 am not using GCC, but this should work.&lt;/P&gt;&lt;P&gt;I will check it with the gcc expert and let you know in case I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 07:23:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disable-Interrupts-and-Enable-Interrupts/m-p/1046038#M15690</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2020-07-23T07:23:19Z</dc:date>
    </item>
  </channel>
</rss>

