<?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: Variable graph 'glitch' in FreeMASTER</title>
    <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006011#M65</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UPDATE:&amp;nbsp; Due to various serious instability issues with the FreeMaster v3.x (i.e., it crashed and not even a PC restart or re-installation would bring it back; saved only by Windows Restore to go back to before the initial installation) I went back to using v2.5 and I noticed the following behavior difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="freemaster_glitch_25.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103291i337FE4D1BE7E1662/image-size/large?v=v2&amp;amp;px=999" role="button" title="freemaster_glitch_25.jpg" alt="freemaster_glitch_25.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, compared to the previous graph, using the exact same settings as before, the problem is much more intense with a lot more spikes, and often twice per slope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leads me to assume that at least part of the problem is FreeMaster software related.&amp;nbsp; Whatever improvements were made from v2.5 to v3.x to reduce those spikes could possibly be improved even further to completely eliminate this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just thought maybe this is something to let the FreeMaster developers know about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2020 08:49:39 GMT</pubDate>
    <dc:creator>tonyp</dc:creator>
    <dc:date>2020-02-11T08:49:39Z</dc:date>
    <item>
      <title>Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006009#M63</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using FreeMaster v3.0.1.3 [Jan 20 2020 14:46:31].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In graphing a variable (specifically the number of msec remaining for a second), I noticed some glitch which shouldn't be there.&amp;nbsp; My code simply decrements this 2-byte variable by 1 in one place in the whole app with the following (9S08) instruction sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LDHX clock_msec_remain&lt;/P&gt;&lt;P&gt;AIX #-1&lt;/P&gt;&lt;P&gt;STHX clock_msec_remain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and reloads it when it becomes zero, again with STHX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the writes are guaranteed to be atomic.&amp;nbsp; But, looking at the graph, I see those small spikes (3rd and last slopes) which do not make sense.&amp;nbsp; They appear randomly, not in fixed distances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked my code and cannot find any issue with it.&amp;nbsp; Plus, the date/time clock (which depends on this variable) does not seem to go either too fast or too slow over a long period (many days).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, before I assume this is a bug in my code somewhere, I have to check with you in case it's an issue with FreeMaster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is it possible that FreeMaster somehow messes it up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, could it be it does not read the 2-byte value atomically with respect to the CPU writes?&amp;nbsp; (Perhaps a limitation of BDM, I don't know.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graph below is set to the fastest possible reads/updates.&amp;nbsp; (I have tried with slower ones, with no difference.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="freemaster_glitch.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103275i60941F4E371728FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="freemaster_glitch.jpg" alt="freemaster_glitch.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I forgot to mention I use P&amp;amp;E Micro's Cyclone PRO with Ethernet connection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 11:04:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006009#M63</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2020-02-10T11:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006010#M64</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not 100% sure about this, but&amp;nbsp;I think that LDHX/STHX are only atomic&amp;nbsp;with regards to instruction fetching, not to the BDM access. This means, that you can rely on the access "atomicity" when executing a code and processing interrupts (ISR will never see such a glitched value), but you may see the glitches when memory is accessed directly via BDM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid that there is no protection against such spikes with BDM direct memory access. The only way would be to use Serial or CAN protocols to communicate between FreeMASTER and a driver in the S08 application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to consult this issue with experts on the S08 architecture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 12:01:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006010#M64</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-02-10T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006011#M65</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UPDATE:&amp;nbsp; Due to various serious instability issues with the FreeMaster v3.x (i.e., it crashed and not even a PC restart or re-installation would bring it back; saved only by Windows Restore to go back to before the initial installation) I went back to using v2.5 and I noticed the following behavior difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="freemaster_glitch_25.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/103291i337FE4D1BE7E1662/image-size/large?v=v2&amp;amp;px=999" role="button" title="freemaster_glitch_25.jpg" alt="freemaster_glitch_25.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, compared to the previous graph, using the exact same settings as before, the problem is much more intense with a lot more spikes, and often twice per slope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leads me to assume that at least part of the problem is FreeMaster software related.&amp;nbsp; Whatever improvements were made from v2.5 to v3.x to reduce those spikes could possibly be improved even further to completely eliminate this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just thought maybe this is something to let the FreeMaster developers know about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2020 08:49:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006011#M65</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2020-02-11T08:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006012#M66</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry for the issues you observe with version 3.0. Would it be possible&amp;nbsp;for you to reach out to me directly by &lt;A href="mailto:michal.hanak@nxp.com"&gt;email&lt;/A&gt;&amp;nbsp;and spend some time to analyze the problems?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: the version 3.0.1&amp;nbsp;brings the latest version of P&amp;amp;E Micro BDM interface libraries.&amp;nbsp;I'm discussing this "spikes" issue internally, I will let you know if there is any outcome of the discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2020 09:07:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006012#M66</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-02-11T09:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006013#M67</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a feedback from experts on the S08/BDM architecture and also from P&amp;amp;E directly. They have confirmed that&amp;nbsp;BDM direct memory access runs asynchronously to CPU read/write cycles. There is no way the spikes could be eliminated using a direct-access BDM plug-in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explanation for less spikes observed when using the latest version of DLLs:&amp;nbsp;the later version has somewhat improved performance during the BDM communication so the probability of meeting the concurrent CPU write operation is smaller.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion:&amp;nbsp;serial communication driver running on target MCU needs to be used to make sure the 16-bit or larger variable values are read atomically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 07:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006013#M67</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-02-19T07:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006014#M68</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where can this "serial communication driver running on target MCU" be found for 9S08 specifically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 10:04:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006014#M68</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2020-02-19T10:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable graph 'glitch'</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006015#M69</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a &lt;A href="https://www.nxp.com/design/software/development-software/freemaster-run-time-debugging-tool:FREEMASTER?tab=Design_Tools_Tab"&gt;FreeMASTER Communication Driver&lt;/A&gt;&amp;nbsp;available for download at &lt;A href="http://www.nxp.com/freemaster"&gt;www.nxp.com/freemaster&lt;/A&gt;&amp;nbsp;home page. It is an older (v2) version of the driver which also had a support for S08JM60 MCU. Please&amp;nbsp;give it a try, it should be fairly straightforward to port it to other S08 parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new v3 driver is only available for&amp;nbsp;Kinetis, LPC, i.MX-RT and other CortexM-based parts as part of &lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt;MCUXpresso SDK&lt;/A&gt;&amp;nbsp;package and other SDKs. The v3 is not currently available for S08.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 10:37:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Variable-graph-glitch/m-p/1006015#M69</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-02-19T10:37:14Z</dc:date>
    </item>
  </channel>
</rss>

