<?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>MQX Software SolutionsのトピックMQX UART lost characters with ESP8266</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388321#M12957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I learning the basics of MQX system on KWIKSTIK K40. Now I trying to communicate with ESP8266 wifi module over UART5 in interrupt mode.&lt;/P&gt;&lt;P&gt;My program send AT commands to the module, then I waiting for response in form of interrupt, finally I print it to the console.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is going well on BAUD RATE 9600.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Here is the response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AT+CIOBAUD=9600&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;AT+GMR&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;But when I change BAUD RATE to 115200 I lost some of characters:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AAUD=115200&lt;/P&gt;&lt;P&gt;OK&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;&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; &lt;EM&gt;&amp;lt;a whole of line is missing&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Or at BAUD RATE 921600:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AT&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This function is called by the interrupt:&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;void uart5_isr(pointer user_isr_ptr) { &amp;nbsp;&amp;nbsp;&amp;nbsp; MY_ISR_STRUCT_PTR&amp;nbsp; isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr; &amp;nbsp;&amp;nbsp;&amp;nbsp; isr_ptr-&amp;gt;TICK_COUNT++; &amp;nbsp;&amp;nbsp;&amp;nbsp; UART_MemMapPtr sci_ptr = _bsp_get_serial_base_address (5);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if((sci_ptr-&amp;gt;S1 &amp;amp; UART_S1_RDRF_MASK) == UART_S1_RDRF_MASK) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; received_char = sci_ptr-&amp;gt;D; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strcat(received_string,&amp;amp;received_char); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; (*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA); } &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;My first question is: why the characters are missing and how to prevent it?&lt;/P&gt;&lt;P&gt;The second: Is this a correct form of handling an interrupt or can It do better?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam just learning of MQX... I attach the source code.&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339273" rel="nofollow noopener noreferrer" target="_blank"&gt;main.c.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2015 16:34:58 GMT</pubDate>
    <dc:creator>mqxman</dc:creator>
    <dc:date>2015-04-08T16:34:58Z</dc:date>
    <item>
      <title>MQX UART lost characters with ESP8266</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388321#M12957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I learning the basics of MQX system on KWIKSTIK K40. Now I trying to communicate with ESP8266 wifi module over UART5 in interrupt mode.&lt;/P&gt;&lt;P&gt;My program send AT commands to the module, then I waiting for response in form of interrupt, finally I print it to the console.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is going well on BAUD RATE 9600.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Here is the response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AT+CIOBAUD=9600&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;AT+GMR&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;But when I change BAUD RATE to 115200 I lost some of characters:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AAUD=115200&lt;/P&gt;&lt;P&gt;OK&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;&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; &lt;EM&gt;&amp;lt;a whole of line is missing&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Or at BAUD RATE 921600:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AT&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;0018000902-AI03&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This function is called by the interrupt:&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;void uart5_isr(pointer user_isr_ptr) { &amp;nbsp;&amp;nbsp;&amp;nbsp; MY_ISR_STRUCT_PTR&amp;nbsp; isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr; &amp;nbsp;&amp;nbsp;&amp;nbsp; isr_ptr-&amp;gt;TICK_COUNT++; &amp;nbsp;&amp;nbsp;&amp;nbsp; UART_MemMapPtr sci_ptr = _bsp_get_serial_base_address (5);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if((sci_ptr-&amp;gt;S1 &amp;amp; UART_S1_RDRF_MASK) == UART_S1_RDRF_MASK) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; received_char = sci_ptr-&amp;gt;D; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strcat(received_string,&amp;amp;received_char); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; (*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA); } &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;My first question is: why the characters are missing and how to prevent it?&lt;/P&gt;&lt;P&gt;The second: Is this a correct form of handling an interrupt or can It do better?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam just learning of MQX... I attach the source code.&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339273" rel="nofollow noopener noreferrer" target="_blank"&gt;main.c.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 16:34:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388321#M12957</guid>
      <dc:creator>mqxman</dc:creator>
      <dc:date>2015-04-08T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: MQX UART lost characters with ESP8266</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388322#M12958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Norbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I strongly suggest to follow the same way the appnote AN4022 is reading and changing UART to read from an external device. The link to the appnote is this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4022.pdf" title="http://cache.freescale.com/files/32bit/doc/app_note/AN4022.pdf"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN4022.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link to the source code is here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4022SW.zip" title="http://cache.freescale.com/files/32bit/doc/app_note/AN4022SW.zip"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN4022SW.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should resolve your issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Garabo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 22:15:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388322#M12958</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2015-04-13T22:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: MQX UART lost characters with ESP8266</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388323#M12959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Norbert!&lt;/P&gt;&lt;P&gt;Do you&amp;nbsp; get the desired result with ESP8266? &lt;/P&gt;&lt;P&gt;I try to do the same as you, with ESP8266 and FRDM-K64.&lt;/P&gt;&lt;P&gt;Can You send me final source code for communication with ESP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 20:20:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388323#M12959</guid>
      <dc:creator>oleglavrukhin</dc:creator>
      <dc:date>2015-09-23T20:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: MQX UART lost characters with ESP8266</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388324#M12960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, no I think there is a problem in ESP8266 firmware, when I switch to another FW this solved my problem.&lt;/P&gt;&lt;P&gt;Try&amp;nbsp; ESP8266 on arduino it is much more better than AT+ commands.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 20:41:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388324#M12960</guid>
      <dc:creator>mqxman</dc:creator>
      <dc:date>2015-12-01T20:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: MQX UART lost characters with ESP8266</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388325#M12961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update the ESP8266 firmware verstion to the latest (1.4) I did and the communication is more stable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 18:11:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-UART-lost-characters-with-ESP8266/m-p/388325#M12961</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2015-12-08T18:11:16Z</dc:date>
    </item>
  </channel>
</rss>

