<?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>Kinetis Microcontrollersのトピックarm cortex m0+ interrupts enable/disable</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395261#M21697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering what is the difference between this two methods for disabling interrupts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.CPSID causes interrupts to be disabled by setting PRIMASK.&lt;/P&gt;&lt;P&gt;2.Disable all Device-specific interrupts writing in NVIC-&amp;gt;ICER[0] + Disable System exceptions (example SysTick - timer and interrupt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 13:17:23 GMT</pubDate>
    <dc:creator>alexleonte</dc:creator>
    <dc:date>2015-08-25T13:17:23Z</dc:date>
    <item>
      <title>arm cortex m0+ interrupts enable/disable</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395261#M21697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering what is the difference between this two methods for disabling interrupts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.CPSID causes interrupts to be disabled by setting PRIMASK.&lt;/P&gt;&lt;P&gt;2.Disable all Device-specific interrupts writing in NVIC-&amp;gt;ICER[0] + Disable System exceptions (example SysTick - timer and interrupt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:17:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395261#M21697</guid>
      <dc:creator>alexleonte</dc:creator>
      <dc:date>2015-08-25T13:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: arm cortex m0+ interrupts enable/disable</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395262#M21698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: normal; text-align: left; text-indent: 30px;"&gt;During the initial reset, NVIC is turned off. Therefore, the processor cannot receive any interrupts (except for NMI, Reset interrupt, and hard fault). To turn on the interrupts with configurable priority:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="_jivemacro_uid_14406399342066948 jive_macro_code jive_text_macro" data-renderedposition="74_8_1232_32" jivemacro_uid="_14406399342066948" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN class="crayon-e" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #004ed0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;asm &lt;/SPAN&gt;&lt;SPAN class="crayon-e" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #004ed0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;volatile&lt;/SPAN&gt;&lt;SPAN class="crayon-h" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #006fe0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt; &lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="crayon-s" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: green !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;"cpsie i"&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: normal; text-align: left; text-indent: 30px;"&gt;“CPSIE I” is a assembly instruction to enable the priority configurable interrupts. Actually, it’s a shortcut to this longer procedure.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14406401491271828 jive_text_macro" data-renderedposition="128.5_8_1232_112" jivemacro_uid="_14406401491271828" modifiedtitle="true"&gt;&lt;/PRE&gt;&lt;TABLE class="crayon-table" style="font-size: 12px; border: 0px !important; padding: 0 !important; margin-right: 0 !important; margin-bottom: 0 !important; margin-top: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace; color: #444444; font-style: normal; font-weight: 500; text-align: left; text-indent: 0px; background-color: #fdfdfd; background-position: initial !important;"&gt;&lt;TBODY style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important;"&gt;&lt;TR class="crayon-row" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; padding: 0 !important; border: 0px !important; margin: 0 !important; background: 0 50%;"&gt;&lt;TD class="crayon-nums" data-settings="show" style="padding: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0 !important; color: #5499de !important; background: #dfefff !important;"&gt;&lt;P class="crayon-nums-content" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; text-align: left; font-size: 12px !important; background: 0 50%;"&gt;&lt;/P&gt;&lt;DIV class="crayon-num" data-line="crayon-55dd7dcd9151b984557010-1" style="font-family: inherit; padding: 0 5px; text-align: center; font-size: inherit !important; font-weight: inherit !important; background: 0 50%;"&gt;1&lt;P&gt;&lt;/P&gt;&lt;P class="crayon-striped-num crayon-num" data-line="crayon-55dd7dcd9151b984557010-2" style="font-family: inherit; padding: 0 5px; text-align: center; font-size: inherit !important; font-weight: inherit !important; color: #317cc5 !important; background: #c8e1fa !important;"&gt;2&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="crayon-code" style="padding: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0 !important; background: 0 50%;"&gt;&lt;P class="crayon-pre" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; text-align: left; color: #000000; font-size: 12px !important; background: none !important;"&gt;&lt;/P&gt;&lt;DIV class="crayon-line" style="font-family: inherit; padding: 0 5px; text-align: left; font-size: inherit !important; font-weight: inherit !important; background: 0 50%;"&gt;&lt;SPAN class="crayon-e" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #004ed0 !important;"&gt;asm &lt;/SPAN&gt;&lt;SPAN class="crayon-e" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #004ed0 !important;"&gt;volatile&lt;/SPAN&gt;&lt;SPAN class="crayon-h" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="crayon-s" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: green !important;"&gt;"MOVS r0, #0\n\&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="crayon-line crayon-striped-line" style="font-family: inherit; padding: 0 5px; text-align: left; font-size: inherit !important; font-weight: inherit !important; background: #f7f7f7 !important;"&gt;&lt;SPAN class="crayon-s" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: green !important;"&gt;MSR PRIMASK, r0"&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: normal; text-align: left; text-indent: 30px;"&gt;To turn off the priority configurable interrupts:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="_jivemacro_uid_14406401873634781 jive_macro_code jive_text_macro" data-renderedposition="263_8_1232_32" jivemacro_uid="_14406401873634781" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN class="crayon-e" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #004ed0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;asm &lt;/SPAN&gt;&lt;SPAN class="crayon-e" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #004ed0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;volatile&lt;/SPAN&gt;&lt;SPAN class="crayon-h" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #006fe0 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt; &lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="crayon-s" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: green !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;"cpsid i"&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; font-weight: 500; color: #333333 !important; font-style: normal; text-align: left; text-indent: 0px; background-color: #fdfdfd;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: normal; text-align: left; text-indent: 30px;"&gt;Or, taking the longer non-atomic procedure:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14406402306582967 jive_text_macro" data-renderedposition="317.5_8_1232_112" jivemacro_uid="_14406402306582967" modifiedtitle="true"&gt;&lt;/PRE&gt;&lt;TABLE class="crayon-table" style="font-size: 12px; border: 0px !important; padding: 0 !important; margin-right: 0 !important; margin-bottom: 0 !important; margin-top: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace; color: #444444; font-style: normal; font-weight: 500; text-align: left; text-indent: 0px; background-color: #fdfdfd; background-position: initial !important;"&gt;&lt;TBODY style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important;"&gt;&lt;TR class="crayon-row" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; padding: 0 !important; border: 0px !important; margin: 0 !important; background: 0 50%;"&gt;&lt;TD class="crayon-nums" data-settings="show" style="padding: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0 !important; color: #5499de !important; background: #dfefff !important;"&gt;&lt;P class="crayon-nums-content" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; text-align: left; font-size: 12px !important; background: 0 50%;"&gt;&lt;/P&gt;&lt;DIV class="crayon-num" data-line="crayon-55dd7dcd91528450852443-1" style="font-family: inherit; padding: 0 5px; text-align: center; font-size: inherit !important; font-weight: inherit !important; background: 0 50%;"&gt;1&lt;P&gt;&lt;/P&gt;&lt;P class="crayon-striped-num crayon-num" data-line="crayon-55dd7dcd91528450852443-2" style="font-family: inherit; padding: 0 5px; text-align: center; font-size: inherit !important; font-weight: inherit !important; color: #317cc5 !important; background: #c8e1fa !important;"&gt;2&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="crayon-code" style="padding: 0 !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0 !important; background: 0 50%;"&gt;&lt;P class="crayon-pre" style="font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; text-align: left; color: #000000; font-size: 12px !important; background: none !important;"&gt;&lt;/P&gt;&lt;DIV class="crayon-line" style="font-family: inherit; padding: 0 5px; text-align: left; font-size: inherit !important; font-weight: inherit !important; background: 0 50%;"&gt;&lt;SPAN class="crayon-e" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #004ed0 !important;"&gt;asm &lt;/SPAN&gt;&lt;SPAN class="crayon-e" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #004ed0 !important;"&gt;volatile&lt;/SPAN&gt;&lt;SPAN class="crayon-h" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #006fe0 !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="crayon-s" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: green !important;"&gt;"MOVS r0, #1\n\&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="crayon-line crayon-striped-line" style="font-family: inherit; padding: 0 5px; text-align: left; font-size: inherit !important; font-weight: inherit !important; background: #f7f7f7 !important;"&gt;&lt;SPAN class="crayon-s" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: green !important;"&gt;MSR PRIMASK, r0"&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="crayon-sy" style="font-family: inherit; font-size: inherit !important; font-weight: inherit !important; color: #333333 !important;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;And the NVIC is applicable to enable or disable specific interrupt, the only thing that you need to do is to set &lt;SPAN style="color: #444444; font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: normal; text-align: left; text-indent: 30px;"&gt;IRQ X ‘Set Enable Register’ (ISER) or ‘Clear Enable Register’ (ICER).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please learn more information about it through the link as below.&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.cortexm.m0plus/index.html" rel="nofollow noopener noreferrer" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.cortexm.m0plus/index.html" target="_blank"&gt;ARM Information Center&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 02:02:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395262#M21698</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-08-27T02:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: arm cortex m0+ interrupts enable/disable</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395263#M21699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This answer is useful. I'm workong on KEA128 with a M0+ core. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The processer core funciton "&amp;nbsp;__disable_irq" &amp;nbsp;and &amp;nbsp;"&lt;SPAN&gt;__get_CONTROL&lt;/SPAN&gt; " cannot turn off or turn on interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this asm work! &amp;nbsp; &amp;nbsp; __&lt;SPAN style="color: black; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;asm&amp;nbsp;volatile&amp;nbsp;(&lt;SPAN class="" style="color: blue; background-color: inherit; border: 0px; font-weight: inherit; font-size: 9pt !important;"&gt;"cpsie&amp;nbsp;i"&lt;/SPAN&gt;); &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solved my problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)&lt;BR /&gt;{&lt;BR /&gt; __ASM volatile ("cpsid i" : : : "memory");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)&lt;BR /&gt;{&lt;BR /&gt; uint32_t result;&lt;/P&gt;&lt;P&gt;__ASM volatile ("MRS %0, control" : "=r" (result) );&lt;BR /&gt; return(result);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 13:59:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/arm-cortex-m0-interrupts-enable-disable/m-p/395263#M21699</guid>
      <dc:creator>pizzburg</dc:creator>
      <dc:date>2017-06-29T13:59:57Z</dc:date>
    </item>
  </channel>
</rss>

