<?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 LPC55S69 problem with PRINTF in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1206087#M43438</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm working on an LPCXpresso55S69 EVK board and having some troubles with PRINTF.&lt;/P&gt;&lt;P&gt;What I want to do: I want to send some data from the uC via UART to the host computer. As I want to send an uint8_t array with 1000 bytes, I have implemented a loop which sends one byte after another with PRINTF. Oddly the uC sometimes sends a bunch of wrong characters before continuing with the correct ones. But where do these wrong characters come from?&lt;/P&gt;&lt;P&gt;this is what I send:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture2.png" style="width: 200px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133838i5F6C2D54C4DAFA2F/image-size/small?v=v2&amp;amp;px=200" role="button" title="picture2.png" alt="picture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is what I receive:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture1.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133837i82D0D6E65B3991C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="picture1.png" alt="picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the green data is sent and then follow some characters (highlighted in blue) and then the red data is sent -&amp;gt; where does this blue highlighted data come from?&lt;/P&gt;&lt;P&gt;I would be glade if someone could help me.&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Ximena&lt;/P&gt;&lt;P&gt;my code looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for(uint32_t j = 0; j &amp;lt; 1000; j++){
   if(data[j] &amp;lt;= 0xf){
        PRINTF("0");
   }
   PRINTF("%x", data[j]);
}
PRINTF("\n");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I also tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;size_t length = 1;
status_t uresult;
for(uint32_t j = 0; j &amp;lt; 1000; j++){
   uresult = USART_WriteBlocking(USART0,&amp;amp;data[j],length);
}
PRINTF("\n");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 11:22:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-04T11:22:40Z</dc:date>
    <item>
      <title>LPC55S69 problem with PRINTF</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1206087#M43438</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm working on an LPCXpresso55S69 EVK board and having some troubles with PRINTF.&lt;/P&gt;&lt;P&gt;What I want to do: I want to send some data from the uC via UART to the host computer. As I want to send an uint8_t array with 1000 bytes, I have implemented a loop which sends one byte after another with PRINTF. Oddly the uC sometimes sends a bunch of wrong characters before continuing with the correct ones. But where do these wrong characters come from?&lt;/P&gt;&lt;P&gt;this is what I send:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture2.png" style="width: 200px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133838i5F6C2D54C4DAFA2F/image-size/small?v=v2&amp;amp;px=200" role="button" title="picture2.png" alt="picture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is what I receive:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture1.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133837i82D0D6E65B3991C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="picture1.png" alt="picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the green data is sent and then follow some characters (highlighted in blue) and then the red data is sent -&amp;gt; where does this blue highlighted data come from?&lt;/P&gt;&lt;P&gt;I would be glade if someone could help me.&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Ximena&lt;/P&gt;&lt;P&gt;my code looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for(uint32_t j = 0; j &amp;lt; 1000; j++){
   if(data[j] &amp;lt;= 0xf){
        PRINTF("0");
   }
   PRINTF("%x", data[j]);
}
PRINTF("\n");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I also tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;size_t length = 1;
status_t uresult;
for(uint32_t j = 0; j &amp;lt; 1000; j++){
   uresult = USART_WriteBlocking(USART0,&amp;amp;data[j],length);
}
PRINTF("\n");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 11:22:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1206087#M43438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-04T11:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 problem with PRINTF</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1207076#M43463</link>
      <description>&lt;P&gt;Hello Ximena,&lt;/P&gt;
&lt;P&gt;A similar behavior has been reported when using the CMSIS-DAP firmware, like in the thread below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USART-driver-duplicate-bytes-being-sent-using-the-SDK/td-p/1177834" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USART-driver-duplicate-bytes-being-sent-using-the-SDK/td-p/1177834&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you haven’t, would you please try using the J-Link firmware to see if this problem is still present?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 20:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1207076#M43463</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2021-01-05T20:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 problem with PRINTF</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1210259#M43541</link>
      <description>&lt;P&gt;Hi Gustavo,&lt;/P&gt;&lt;P&gt;thanks for your answer. I will try this out this week and report back if it worked.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Report:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Perfect, it works now and only sends the correct number of characters when using the J-Link firmware!!!&lt;/P&gt;&lt;P&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Ximena&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 09:05:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-problem-with-PRINTF/m-p/1210259#M43541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-14T09:05:07Z</dc:date>
    </item>
  </channel>
</rss>

