<?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>Digital Signal ControllersのトピックHW Stack Overflow on MC56F8035</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479321#M645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm working on solar microinverter with MC56F8035 DSC. I&amp;nbsp; use Quickstart / CW 5.9.0 for software development. I faced the issue with HW stack overflow. My program includes ADC converter and Timer A0 controlled by coresponding interrupts (level 1/level2). Both interrupt service routines and its subfunctions use # pragma interrupt on/off to store/restore data/registers correctly. I reviewed linker command file SDM_pflash.cmd where stack size is defined. I increased it from 0x100 to 0x200 but there was no improvement, HW stack overflow occured again. Any idea what's wrong? Thanks in advance for your advise. Have a nice day. Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Jan 2016 21:53:06 GMT</pubDate>
    <dc:creator>petercernan</dc:creator>
    <dc:date>2016-01-10T21:53:06Z</dc:date>
    <item>
      <title>HW Stack Overflow on MC56F8035</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479321#M645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm working on solar microinverter with MC56F8035 DSC. I&amp;nbsp; use Quickstart / CW 5.9.0 for software development. I faced the issue with HW stack overflow. My program includes ADC converter and Timer A0 controlled by coresponding interrupts (level 1/level2). Both interrupt service routines and its subfunctions use # pragma interrupt on/off to store/restore data/registers correctly. I reviewed linker command file SDM_pflash.cmd where stack size is defined. I increased it from 0x100 to 0x200 but there was no improvement, HW stack overflow occured again. Any idea what's wrong? Thanks in advance for your advise. Have a nice day. Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jan 2016 21:53:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479321#M645</guid>
      <dc:creator>petercernan</dc:creator>
      <dc:date>2016-01-10T21:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: HW Stack Overflow on MC56F8035</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479322#M646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not seen the source code but at first glance it seems that the interrupt handler is defined incorrectly.&lt;/P&gt;&lt;P&gt;Interrupt handler definition using&lt;/P&gt;&lt;P&gt;“#pragma interrupt on/off”&lt;/P&gt;&lt;P&gt;can only be used when&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the interrupt handler does not call any function/routine and&lt;/P&gt;&lt;P&gt;entire “raw” source code is written inside the interrupt handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If at least one function is called from the interrupt handler, the definition above leads to software crash and the HW stack overflow condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution: Use “#pragma interrupt saveall” before the interrupt handler definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of correct definition of the interrupt handler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma interrupt saveall&lt;/P&gt;&lt;P&gt;void HandlerISR(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;/* user source code including function calls */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 20:42:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479322#M646</guid>
      <dc:creator>johnlwinters</dc:creator>
      <dc:date>2016-01-11T20:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: HW Stack Overflow on MC56F8035</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479323#M647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first of all, thank you very much for your advice. It works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right, my interrupt service routines included subfunctions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HW stack overflow didn't occur again once I changed all the ISR's to "#pragma interrupt saveall" (while keeping subfunctions called by ISR's with “#pragma interrupt on/off”).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 21:19:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/HW-Stack-Overflow-on-MC56F8035/m-p/479323#M647</guid>
      <dc:creator>petercernan</dc:creator>
      <dc:date>2016-01-12T21:19:42Z</dc:date>
    </item>
  </channel>
</rss>

