<?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 IIC busy flag not being cleared in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129877#M2222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been fighting this for awhile and was very happy to see your post with the cause - but, I went back through my code and everywhere I set a START the BUSY bit is checked:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while( (IIC1S_BUSY == TRUE) &amp;amp;&amp;amp; !TimerHasExpired(TimerIIC))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;__RESET_WATCHDOG();&lt;/P&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see the BUSY bit locked up every time - it has actually gone weeks without locking up, but it will eventually lock up and I have to toggle the IIC_EN bit off and on to get it un-wedged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has there ever been any official reply from Freescale?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2009 01:15:45 GMT</pubDate>
    <dc:creator>BlueCrayon</dc:creator>
    <dc:date>2009-04-28T01:15:45Z</dc:date>
    <item>
      <title>QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129871#M2216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I cannot figure out why the IIC bus busy flag is not getting cleared.&amp;nbsp; The flag remains at 1 when the below code is executed a third time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// Turns on or off a specified display LED connected to the MAX7658&lt;BR /&gt;void write_LEDs(unsigned char LED_number, unsigned char LED_status)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;if (LED_status == on)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set_bit(current_Segments, LED_number);&lt;BR /&gt;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clear_bit(current_Segments, LED_number);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;while(IICS_BUSY);&amp;nbsp;&amp;nbsp; // wait for bus to free&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;START_BIT;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send start signal&lt;BR /&gt;&amp;nbsp;IICD = max6958_slave_address; // send calling address (write bit is included)&lt;BR /&gt;&amp;nbsp;while(!IICS_TCF);&amp;nbsp;&amp;nbsp; // wait for byte transfer to complete&lt;BR /&gt;&amp;nbsp;acknowledge = check_ACK();&lt;BR /&gt;&amp;nbsp;if (acknowledge == DEVICE_NO_ACK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;IICD = Segments;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Segments register&lt;BR /&gt;&amp;nbsp;while(!IICS_TCF);&amp;nbsp;&amp;nbsp; // wait for byte transfer to complete&lt;BR /&gt;&amp;nbsp;acknowledge = check_ACK();&lt;BR /&gt;&amp;nbsp;if (acknowledge == DEVICE_NO_ACK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;IICD = current_Segments; // LED x on&lt;BR /&gt;&amp;nbsp;while(!IICS_TCF);&amp;nbsp;&amp;nbsp; // wait for byte transfer to complete&lt;BR /&gt;&amp;nbsp;acknowledge = check_ACK();&lt;BR /&gt;&amp;nbsp;if (acknowledge == DEVICE_NO_ACK)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt;&amp;nbsp;STOP_BIT;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send stop signal&lt;BR /&gt;&lt;BR /&gt;}&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 04:05:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129871#M2216</guid>
      <dc:creator>FC</dc:creator>
      <dc:date>2007-04-07T04:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129872#M2217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I forgot to add:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// Checks if IIC device sends ACK signal&lt;BR /&gt;unsigned char check_ACK(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;unsigned char delay = 10;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;while(delay--);&lt;BR /&gt;&amp;nbsp;if (IICS_RXAK == 1)&amp;nbsp;&amp;nbsp; // check for ACK&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;STOP_BIT;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // device did not send ACK , set SDA high, and return error&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return(DEVICE_NO_ACK);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return(DEVICE_ACK);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 05:04:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129872#M2217</guid>
      <dc:creator>FC</dc:creator>
      <dc:date>2007-04-07T05:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129873#M2218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;PLEASE HELP;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;After a few hard hours of testing, a conclusion is made:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1.&amp;nbsp; The QG8 datasheet is not correct for the IIC module&lt;/DIV&gt;&lt;DIV&gt;2.&amp;nbsp; The mcu on the QG8 demo board has a problem&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Despite this, I figured a soluton to the IICS_BUSY flag not clearing.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Between successive bus transfers, I added this to reset the IIC bus:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IICC_IICEN = 0;&lt;BR /&gt;IICC_IICEN = 1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now all my code works as expected.&amp;nbsp; But this was a frustrating and troublesome problem to resolve especially with no&amp;nbsp;scope to see the IIC bus activity.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 08:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129873#M2218</guid>
      <dc:creator>FC</dc:creator>
      <dc:date>2007-04-08T08:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129874#M2219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Dear FC,&lt;BR /&gt;&lt;BR /&gt;As you require an answer, please DO submit a Service Request.&lt;BR /&gt;See the link in my address.&lt;BR /&gt;&lt;BR /&gt;In the descripotion of the issue, include your investigations + the URL of your thread on the Forum.&lt;BR /&gt;You can send me, via Private Message, the SR# you receive back from the system and I can make sure you have filed the detail correctly to ensure a faster resolution and prevent the request to be mis-directed.&lt;BR /&gt;&lt;BR /&gt;Alban.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 16:11:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129874#M2219</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-04-08T16:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129875#M2220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I have recently discovered this issue with the IIC BUSY flag not getting cleared.&amp;nbsp; I have a single master-single slave system.&amp;nbsp; Logic analyzer shows the bus is idle, but the IIC module has the busy flag set.&amp;nbsp; Only way to clear it is to disable, reenable the IIC module as suggested.&amp;nbsp; The code works perfectly after this change, though it is not a clean solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does anyone know if this issue has been resolved.&amp;nbsp; This is a very old thread, yet I can find no resolution either way.&amp;nbsp; I have also checked the errata for the QG8 and found nothing.&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129875#M2220</guid>
      <dc:creator>Summerville</dc:creator>
      <dc:date>2008-05-06T06:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129876#M2221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Update:&amp;nbsp; I have determined the cause of the problem.&amp;nbsp; Since mine is a single master system, I was not checking to see if the bus is busy before attempting to send a start bit (MST 0-&amp;gt;1).&amp;nbsp;&amp;nbsp; Sending a start bit before the stop bit completes apparently prevents the module from detecting its own stop, which is apparently required for the BUSY flag to get cleared.&amp;nbsp; That is likely how the busy flag locks up.&amp;nbsp; Polling for BUSY=0 before transmitting a start solves the problem.&lt;BR /&gt;&lt;BR /&gt;I still believe this is an issue that should be addressed in hardware.&amp;nbsp; The idle bus should eventually clear the BUSY flag.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this helps someone else having similar problems.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 00:18:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129876#M2221</guid>
      <dc:creator>Summerville</dc:creator>
      <dc:date>2008-05-07T00:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 IIC busy flag not being cleared</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129877#M2222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been fighting this for awhile and was very happy to see your post with the cause - but, I went back through my code and everywhere I set a START the BUSY bit is checked:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while( (IIC1S_BUSY == TRUE) &amp;amp;&amp;amp; !TimerHasExpired(TimerIIC))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;__RESET_WATCHDOG();&lt;/P&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see the BUSY bit locked up every time - it has actually gone weeks without locking up, but it will eventually lock up and I have to toggle the IIC_EN bit off and on to get it un-wedged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has there ever been any official reply from Freescale?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 01:15:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-IIC-busy-flag-not-being-cleared/m-p/129877#M2222</guid>
      <dc:creator>BlueCrayon</dc:creator>
      <dc:date>2009-04-28T01:15:45Z</dc:date>
    </item>
  </channel>
</rss>

