<?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: Re: Printf error on MQX Lite in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383610#M12778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using CW 10.6,&amp;nbsp; Build Id:140329.&lt;/P&gt;&lt;P&gt;A demo project with this same error is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 13:31:20 GMT</pubDate>
    <dc:creator>wendersonolivei</dc:creator>
    <dc:date>2014-09-05T13:31:20Z</dc:date>
    <item>
      <title>Printf error on MQX Lite</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383606#M12774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the MQX Lite on my FRDM KL25Z.&lt;/P&gt;&lt;P&gt;I'm having a problem with printf inside a loop. This is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1409074651592770" jivemacro_uid="_1409074651592770" modifiedtitle="true"&gt;
&lt;P&gt;void Initial_task(uint32_t task_init_data)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; uint32 ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; #ifdef DEBUG&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for(ptr = 0; ptr &amp;lt; 10; ptr++)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\n"); //Clear terminal&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("\n&amp;lt; start &amp;gt;\n\n");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; #endif&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; HardwareInitialize();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("\n&amp;gt; Hardware Initializated\n");&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SetAudio(2);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for(;;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (LED_GetVal())&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nLED on");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay_ticks(2000);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The printf inside the "for" isn't working. When I run that code, the program stops at PE_ISR(Cpu_ivINT_Hard_Fault).&lt;/P&gt;&lt;P&gt;I can make it work by removing the printf function from loop. But, why that isn't working at this loop?&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, 26 Aug 2014 17:42:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383606#M12774</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-08-26T17:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Printf error on MQX Lite</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383607#M12775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it work if you put the loop after the HardwareInitialize() call? It may be that the HardwareInitialize turns on the clock gating for the UART module, and if you try to use the UART module before that it would cause a hard fault like you're seeing. Try moving it to after it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Anthony &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 22:00:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383607#M12775</guid>
      <dc:creator>anthony_huereca</dc:creator>
      <dc:date>2014-08-26T22:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Printf error on MQX Lite</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383608#M12776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anthony&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I did not express myself correctly... the "printf" that isn't working is from the second "for". The hardware initialize function just set IO ports, the UART module is initialized by PEx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 11:13:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383608#M12776</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-08-27T11:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Printf error on MQX Lite</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383609#M12777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wenderson.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please upload your demo project here? I will test it. &lt;/P&gt;&lt;P&gt;Please also let me know your CW version: Start the IDE and click on Help | About CodeWarrior Development Studio. Send me the version and build id. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZhangJun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 11:33:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383609#M12777</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-08-27T11:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Printf error on MQX Lite</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383610#M12778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using CW 10.6,&amp;nbsp; Build Id:140329.&lt;/P&gt;&lt;P&gt;A demo project with this same error is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 13:31:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Printf-error-on-MQX-Lite/m-p/383610#M12778</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-09-05T13:31:20Z</dc:date>
    </item>
  </channel>
</rss>

