<?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>S12 / MagniV Microcontrollers中的主题 Re: sprintf interaction with timer interrupt</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133747#M1957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the advice!&amp;nbsp; I tried it out and it worked great.&amp;nbsp; Now is my time for complaining.&amp;nbsp; If an interrupt routine is going to disturb a page register why should we have to tell it to resotre the register when done?&amp;nbsp; I thought that would be the most logical thing to do!!!!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2007 21:06:35 GMT</pubDate>
    <dc:creator>mikey1</dc:creator>
    <dc:date>2007-05-15T21:06:35Z</dc:date>
    <item>
      <title>sprintf interaction with timer interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133745#M1955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;for the 9S12X chip I am getting the wrong results from the sprintf function if I am running in Large memory model and have a timer interrupt running.&amp;nbsp; It apears that the GPAGE register is not preserved correctly and the sprintf code fails to do its thing correctly.&amp;nbsp; Some times the code even locks up and does not return. the code runs in banked memory model without a hitch.&amp;nbsp; Do I have something set up wrong for the Large memory model?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 04:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133745#M1955</guid>
      <dc:creator>mikey1</dc:creator>
      <dc:date>2007-05-15T04:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf interaction with timer interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133746#M1956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You need to tell the compiler it needs to save the GPAGE in the interrupt function entry code and restore it at in the exit code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In order to make sure the GPAGE is preserved over an interrupt you can:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; 1- Use pragma TRAP_PROC SAVE_ALL_REGS&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drawback here is the compiler will save all page registers (PPAGE, GPAGE, RPAGE, EPAGE).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This might be too much overhead for the interrupt function&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; 2- Build with option -CpGPAGE=0x10&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; An interrupt routine saves, by default, those page registers given by the&amp;nbsp;line options "-Cp".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 09:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133746#M1956</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-05-15T09:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf interaction with timer interrupt</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133747#M1957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the advice!&amp;nbsp; I tried it out and it worked great.&amp;nbsp; Now is my time for complaining.&amp;nbsp; If an interrupt routine is going to disturb a page register why should we have to tell it to resotre the register when done?&amp;nbsp; I thought that would be the most logical thing to do!!!!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 21:06:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/sprintf-interaction-with-timer-interrupt/m-p/133747#M1957</guid>
      <dc:creator>mikey1</dc:creator>
      <dc:date>2007-05-15T21:06:35Z</dc:date>
    </item>
  </channel>
</rss>

