<?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: HCS12 nested interrupts in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159566#M4946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can nested interrupt function with uC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, command &lt;EM&gt;asm CLI;&lt;/EM&gt; will clear I bit and this way interrupt routine could be interrupted by another interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prior you clear I bit, you must clear flag of current interrupt routine (Modulus Down Counter), otherwise your program will hang in entrance into interrupt routine (Modulus Down Counter). I suppose that this could be root cause of your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case S12D, interrupt priority has no influence. When you clear I bit, program can jump to any interrupt routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want drive interrupts according priority or if you want gets more information about interrupts nesting on S12 MCU, I would like recommend our application note AN2617 A Software Piority Interrupt Scheme on HCS12 Microcontrollers:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2617.pdf"&gt;http://www.freescale.com/files/microcontrollers/doc/app_note/AN2617.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;software:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2617SW"&gt;http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2617SW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2012 09:56:51 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2012-10-31T09:56:51Z</dc:date>
    <item>
      <title>HCS12 nested interrupts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159564#M4944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are using mc9s12dg256 uC for our project. We have implement ISR for Port P Interrupt, CAN0, SPI1, SP2, Modulus Down Counter underflow, Port J, SCI1,SC2, TimerHandler, TC7_int, TC3_int, Real timer and XIRQ that work fine without nested interrupts.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What we need to do is to allow nested interrupts only at Modulus Down Counter. Thus, we added a CLI command to its ISR, but the device now is not responding. The stack seems to be empty.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible a nested interrupt function with this uC?&lt;/P&gt;&lt;P&gt;If yes, are any other settings that has to be made?&lt;/P&gt;&lt;P&gt;Does priority has to do anything with this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 07:18:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159564#M4944</guid>
      <dc:creator>michaelsarafidi</dc:creator>
      <dc:date>2012-10-31T07:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 nested interrupts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159565#M4945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have increased the stack size in case there is a stack overflow but still nothing...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 07:58:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159565#M4945</guid>
      <dc:creator>michaelsarafidi</dc:creator>
      <dc:date>2012-10-31T07:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 nested interrupts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159566#M4946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can nested interrupt function with uC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, command &lt;EM&gt;asm CLI;&lt;/EM&gt; will clear I bit and this way interrupt routine could be interrupted by another interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prior you clear I bit, you must clear flag of current interrupt routine (Modulus Down Counter), otherwise your program will hang in entrance into interrupt routine (Modulus Down Counter). I suppose that this could be root cause of your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case S12D, interrupt priority has no influence. When you clear I bit, program can jump to any interrupt routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want drive interrupts according priority or if you want gets more information about interrupts nesting on S12 MCU, I would like recommend our application note AN2617 A Software Piority Interrupt Scheme on HCS12 Microcontrollers:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2617.pdf"&gt;http://www.freescale.com/files/microcontrollers/doc/app_note/AN2617.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;software:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2617SW"&gt;http://www.freescale.com/webapp/sps/download/license.jsp?colCode=AN2617SW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 09:56:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159566#M4946</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2012-10-31T09:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 nested interrupts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159567#M4947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 10:22:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159567#M4947</guid>
      <dc:creator>michaelsarafidi</dc:creator>
      <dc:date>2012-10-31T10:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 nested interrupts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159568#M4948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Radek Sestak wrote:&lt;/P&gt;
&lt;P&gt;Prior you clear I bit, you must clear flag of current interrupt routine (Modulus Down Counter), otherwise your program will hang in entrance into interrupt routine (Modulus Down Counter). I suppose that this could be root cause of your issue.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;I recommend to clear interrupt mask (modulus down counter interrupt mask in our case), not interrupt flag. Flag may get set again quickly and will make MDC interrupt triggered, and could make stack growing again. Disabling interrupt will prevent it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:04:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-nested-interrupts/m-p/159568#M4948</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2020-10-29T09:04:56Z</dc:date>
    </item>
  </channel>
</rss>

