<?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: QG8 Hanging on Power Reset when UART accessed in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-Hanging-on-Power-Reset-when-UART-accessed/m-p/126780#M1212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;The COP is timing out while waiting for the data???&lt;/P&gt;&lt;P&gt;Disable COP or feed dog in your waiting for data to fill buffer loop.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2006 05:00:12 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2006-08-16T05:00:12Z</dc:date>
    <item>
      <title>QG8 Hanging on Power Reset when UART accessed</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-Hanging-on-Power-Reset-when-UART-accessed/m-p/126779#M1211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I've got a simple application that hangs on power reset.&amp;nbsp; I'm programming it with the P&amp;amp;E USB Multilink through the debug screen in CodeWarrior.&amp;nbsp; The target is set correctly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Once I disconnect the P&amp;amp;E and do a power cycle, the chip just hangs.&amp;nbsp; I'm using LEDs to verify correct operation.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, if I comment out my readData (listed below) function which reads data from the UART, everything will function on a power reset.&amp;nbsp; I've tried both interrupt based and polling for the UART, and it makes no difference.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;//=============================================================================&lt;BR /&gt;// readData&lt;BR /&gt;//-----------------------------------------------------------------------------&lt;BR /&gt;//=============================================================================&lt;BR /&gt;int readData(void *dataBuffer, int dataBufferSize)&lt;BR /&gt;{&lt;BR /&gt;int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnValue = 0;&lt;BR /&gt;int&amp;nbsp;&amp;nbsp; i;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;// If we have a bad data buffer pointer then we fail.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if(dataBuffer == 0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto EXIT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;for(i=0;i&amp;lt;dataBufferSize;i++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (SCIS1_RDRF == 0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;((unsigned char*)dataBuffer)[i] = SCID;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SCIS1_RDRF = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //acknowledge Receiver Full flag&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;returnValue = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;EXIT:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return returnValue;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there something about the RX on the UART that would prevent the chip from reseting properly?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also have a TX function in there and it works fine.&amp;nbsp; So I don't think it's the entire UART.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any help is greatly appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;James&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 23:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-Hanging-on-Power-Reset-when-UART-accessed/m-p/126779#M1211</guid>
      <dc:creator>jimstevens</dc:creator>
      <dc:date>2006-08-15T23:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 Hanging on Power Reset when UART accessed</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-Hanging-on-Power-Reset-when-UART-accessed/m-p/126780#M1212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;The COP is timing out while waiting for the data???&lt;/P&gt;&lt;P&gt;Disable COP or feed dog in your waiting for data to fill buffer loop.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 05:00:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-Hanging-on-Power-Reset-when-UART-accessed/m-p/126780#M1212</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-08-16T05:00:12Z</dc:date>
    </item>
  </channel>
</rss>

