<?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 FreeMASTER variable loses scope in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422852#M3435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently, I am trying to use freemaster for debugging. I includes the PE Freemaster module into my project and I was able to open to communication path to freemaster and read global variables.&lt;/P&gt;&lt;P&gt;my code is pretty easy at the moment. something like:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;static uint8_t FRMTR1; /*lint -save&amp;nbsp; -e970 Disable MISRA rule (6.3) checking. */ int main(void) /*lint -restore Enable MISRA rule (6.3) checking. */ { &amp;nbsp; /* Write your local variable definition here */ &amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t state=0; &amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ &amp;nbsp; PE_low_level_init(); &amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&amp;nbsp; &amp;nbsp; /* Write your code here */ &amp;nbsp; WAIT1_Waitms(200); &amp;nbsp; LED1_Neg(); &amp;nbsp; FRMTR1=0;&amp;nbsp; &amp;nbsp; for(;;){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAIT1_Waitms(200); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FRMTR1=!FRMTR1; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FMSTR1_Poll(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FMSTR1_Recorder(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So generally very easy. In FreeMASTER I generated a Subblock which is watching FRMTR1 and a Scope to graph the behaviour. The scope is configured to be a line graph...&lt;/P&gt;&lt;P&gt;What bothers me is, that the variable does not have a constant toggling value but seems to loose its scope in between. I made a gif to show that, hopefully that will play here:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="71273_71273.gif"&gt;&lt;IMG alt="71273_71273.gif" src="https://community.nxp.com/t5/image/serverpage/image-id/120602i42A5FAE4907AEC36/image-size/large?v=v2&amp;amp;px=999" title="71273_71273.gif" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="FreeMASTER.gif"&gt;&lt;IMG alt="FreeMASTER.gif" src="https://community.nxp.com/t5/image/serverpage/image-id/54653i54D406ECF04440CF/image-size/large?v=v2&amp;amp;px=999" title="FreeMASTER.gif" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the according scope consequently looks like&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="71274_71274.PNG"&gt;&lt;IMG alt="71274_71274.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/120603i409E20D4A99DE27B/image-size/large?v=v2&amp;amp;px=999" title="71274_71274.PNG" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="FreeMASTER.PNG"&gt;&lt;IMG alt="FreeMASTER.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/54708i43468F62D7F4F7EB/image-size/large?v=v2&amp;amp;px=999" title="FreeMASTER.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried to increase the sampling rate in FreeMASTER to maximum but it didn't chance anything.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the TWR-K60F120M and FreeMASTER is configured over the OSJTAG USB serial bridge.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any answer,&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 13:19:08 GMT</pubDate>
    <dc:creator>jrs1986</dc:creator>
    <dc:date>2020-11-02T13:19:08Z</dc:date>
    <item>
      <title>FreeMASTER variable loses scope</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422852#M3435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently, I am trying to use freemaster for debugging. I includes the PE Freemaster module into my project and I was able to open to communication path to freemaster and read global variables.&lt;/P&gt;&lt;P&gt;my code is pretty easy at the moment. something like:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;static uint8_t FRMTR1; /*lint -save&amp;nbsp; -e970 Disable MISRA rule (6.3) checking. */ int main(void) /*lint -restore Enable MISRA rule (6.3) checking. */ { &amp;nbsp; /* Write your local variable definition here */ &amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t state=0; &amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ &amp;nbsp; PE_low_level_init(); &amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&amp;nbsp; &amp;nbsp; /* Write your code here */ &amp;nbsp; WAIT1_Waitms(200); &amp;nbsp; LED1_Neg(); &amp;nbsp; FRMTR1=0;&amp;nbsp; &amp;nbsp; for(;;){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAIT1_Waitms(200); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FRMTR1=!FRMTR1; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FMSTR1_Poll(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FMSTR1_Recorder(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So generally very easy. In FreeMASTER I generated a Subblock which is watching FRMTR1 and a Scope to graph the behaviour. The scope is configured to be a line graph...&lt;/P&gt;&lt;P&gt;What bothers me is, that the variable does not have a constant toggling value but seems to loose its scope in between. I made a gif to show that, hopefully that will play here:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="71273_71273.gif"&gt;&lt;IMG alt="71273_71273.gif" src="https://community.nxp.com/t5/image/serverpage/image-id/120602i42A5FAE4907AEC36/image-size/large?v=v2&amp;amp;px=999" title="71273_71273.gif" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="FreeMASTER.gif"&gt;&lt;IMG alt="FreeMASTER.gif" src="https://community.nxp.com/t5/image/serverpage/image-id/54653i54D406ECF04440CF/image-size/large?v=v2&amp;amp;px=999" title="FreeMASTER.gif" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the according scope consequently looks like&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="71274_71274.PNG"&gt;&lt;IMG alt="71274_71274.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/120603i409E20D4A99DE27B/image-size/large?v=v2&amp;amp;px=999" title="71274_71274.PNG" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="FreeMASTER.PNG"&gt;&lt;IMG alt="FreeMASTER.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/54708i43468F62D7F4F7EB/image-size/large?v=v2&amp;amp;px=999" title="FreeMASTER.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried to increase the sampling rate in FreeMASTER to maximum but it didn't chance anything.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the TWR-K60F120M and FreeMASTER is configured over the OSJTAG USB serial bridge.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any answer,&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:19:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422852#M3435</guid>
      <dc:creator>jrs1986</dc:creator>
      <dc:date>2020-11-02T13:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER variable loses scope</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422853#M3436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have solved the Problem&lt;/P&gt;&lt;P&gt;I realized that FreeMASTER showed errors in the scope:&lt;/P&gt;&lt;P&gt;ERROR code=0x80000081&lt;/P&gt;&lt;P&gt;ERROR code=0x80000101&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, I didn't find any translation of these codes. The second one means response timeout, I think. I couldn't explain the errors, but there obviously a problem with my connection.&lt;/P&gt;&lt;P&gt;Till then I used direct RS232 over the OSJTAG Port. So just as a guess, I changed that to the FreeMASTER BDM Communication Plug-in and miraculously everything worked like a charm. No errors anymore and the variable is continuous. :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 09:09:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422853#M3436</guid>
      <dc:creator>jrs1986</dc:creator>
      <dc:date>2015-09-03T09:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER variable loses scope</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422854#M3437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jan,&lt;/P&gt;&lt;P&gt;I think that you call FMSTR_poll slower according the uart setting you select.&lt;/P&gt;&lt;P&gt;If you try to slow down the setting of the uart you will solve the issue.&lt;/P&gt;&lt;P&gt;If your main&amp;nbsp;loop there are too many call you'll need to call FMSTR_Isr and put in a interrupt.&lt;/P&gt;&lt;P&gt;Always pay attention at the speed you seclect for the uart. (&amp;nbsp;call period = 1 char at uart speed&amp;nbsp;)&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Ciao,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 16:22:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/FreeMASTER-variable-loses-scope/m-p/422854#M3437</guid>
      <dc:creator>EmilioBrivio</dc:creator>
      <dc:date>2016-09-23T16:22:36Z</dc:date>
    </item>
  </channel>
</rss>

