<?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>8-bit Microcontrollers中的主题 anybody knows what is my Uart code problem</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/182998#M13495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on zigbee 1321x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to send two bytes at periodic time intervals from zigbee node to uart (for example every 1 seconds).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used this code in the interval timer callback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void TimerCallBack&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; tmrTimerID_t&amp;nbsp; timerId&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; uint8_t testByte[2]={0x12,0x34};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (void) timerId;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (void)UartX_Transmit(testByte , 2, NULL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;anybody knows what is the problem? The first byte is received correctly (0x01), but the second byte does not appear stable, it changes continuosly and some instances takes the correct value (0x34).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PLEASE REPLY..................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2008 19:15:22 GMT</pubDate>
    <dc:creator>bitasobhani</dc:creator>
    <dc:date>2008-09-01T19:15:22Z</dc:date>
    <item>
      <title>anybody knows what is my Uart code problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/182998#M13495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on zigbee 1321x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to send two bytes at periodic time intervals from zigbee node to uart (for example every 1 seconds).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used this code in the interval timer callback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void TimerCallBack&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; tmrTimerID_t&amp;nbsp; timerId&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; uint8_t testByte[2]={0x12,0x34};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (void) timerId;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; (void)UartX_Transmit(testByte , 2, NULL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;anybody knows what is the problem? The first byte is received correctly (0x01), but the second byte does not appear stable, it changes continuosly and some instances takes the correct value (0x34).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PLEASE REPLY..................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 19:15:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/182998#M13495</guid>
      <dc:creator>bitasobhani</dc:creator>
      <dc:date>2008-09-01T19:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: anybody knows what is my Uart code problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/182999#M13496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I solved my probem by declaring testByte as a global variable outside the timer callback function (instead of local variable).&lt;BR /&gt;It worked correctly&lt;SPAN&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/SPAN&gt; But I didn't understand WHY?!!! Because it&amp;nbsp; was being used only in that function not any other one.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 19:58:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/182999#M13496</guid>
      <dc:creator>bitasobhani</dc:creator>
      <dc:date>2008-09-01T19:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: anybody knows what is my Uart code problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/183000#M13497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hi - perhaps the transmit routine buffers the array parameters (and not the contents) for later (interrupt) transmission, thus the data is lost when the test function exits (releasing the stack frame).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Jim&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 03:57:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/anybody-knows-what-is-my-Uart-code-problem/m-p/183000#M13497</guid>
      <dc:creator>JimB</dc:creator>
      <dc:date>2008-09-02T03:57:28Z</dc:date>
    </item>
  </channel>
</rss>

