<?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: I2C IBSR_IBB clearing early in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-IBSR-IBB-clearing-early/m-p/134652#M2111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Shawn,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;A loss of arbitration, please&amp;nbsp; read the IIC Phillips spec under LOAs. When there is a loss of arbritation the Master defaults to a Slave and the IBB and other control bits are cleared. To minimize that problem please have the&amp;nbsp; implement IIC pullup accelarators. Such devices can be found on&lt;/SPAN&gt; &lt;A href="http://www.google.com/"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/www.google.com" target="test_blank"&gt;www.google.com&lt;/A&gt;&lt;A href="http://forums.freescale.com/freescale/board/www.google.com" target="_blank"&gt;http://forums.freescale.com/freescale/board/www.google.com&lt;/A&gt;&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I hope this helps.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Nina&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Jun 2007 21:47:19 GMT</pubDate>
    <dc:creator>NLFSJ</dc:creator>
    <dc:date>2007-06-09T21:47:19Z</dc:date>
    <item>
      <title>I2C IBSR_IBB clearing early</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-IBSR-IBB-clearing-early/m-p/134651#M2110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;CW Pro v4.6&lt;/DIV&gt;&lt;DIV&gt;9S12DT256, mask 0L01Y&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What would cause the IBB bit in IBSR to clear in the middle of a byte being transmitted?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to write to and then read and expansion port chip. I had been writing successfully but when I started to do the reads I noticed that my I2C bean function CheckBus() which is a macro for IBSR_IBB is clearing in the middle of a byte being transmitted. Because the RecvBlock function takes a pointer to a buffer I was calling that function and then trying to wait for the indication that a specified number of bytes had been received.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I need to write to the expansion port chip one byte address with write bit set and the number of the register to read as the second byte. Then I need to send the one byte address with write bit cleared (which RecvBlock() does) prior to receiving the number of bytes specified as a parameter to RecvBlock().&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is the code:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; byte error ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; byte receivedData[4];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; word *bytesRead ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; destination = port ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; error = I2C1_SelectSlave( (byte)(destination + ADDRESS_BASE) );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; IICCommand.asField.commandByte = INPUT_PORT_REGISTER ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; error = I2C1_SendChar(IICCommand.asField.commandByte);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // blocking while bus is busy&lt;BR /&gt;&amp;nbsp;&amp;nbsp; while(IBSR &amp;amp; IBSR_IBB)&amp;nbsp; // or while(I2C1_CheckBus())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTE |= 0x04 ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for debugging with scope&lt;BR /&gt;&amp;nbsp;&amp;nbsp; PORTE &amp;amp;= ~0x04;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; error = I2C1_RecvBlock(receivedData, 1, bytesRead);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; while(IBSR &amp;amp; IBSR_IBB)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTE |= 0x04 ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; PORTE &amp;amp;= ~0x04;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *data = receivedData[0] ;&amp;nbsp;&amp;nbsp; // *data is a parameter to this function&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have put a scope on SCL, SDA and&amp;nbsp;on GPIO PE2 and watched this happen over and over. IBB should go high on a start condition and low on a stop condition and indicate a busy bus.&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>Thu, 24 May 2007 00:49:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-IBSR-IBB-clearing-early/m-p/134651#M2110</guid>
      <dc:creator>sricker</dc:creator>
      <dc:date>2007-05-24T00:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: I2C IBSR_IBB clearing early</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-IBSR-IBB-clearing-early/m-p/134652#M2111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Shawn,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;A loss of arbitration, please&amp;nbsp; read the IIC Phillips spec under LOAs. When there is a loss of arbritation the Master defaults to a Slave and the IBB and other control bits are cleared. To minimize that problem please have the&amp;nbsp; implement IIC pullup accelarators. Such devices can be found on&lt;/SPAN&gt; &lt;A href="http://www.google.com/"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/www.google.com" target="test_blank"&gt;www.google.com&lt;/A&gt;&lt;A href="http://forums.freescale.com/freescale/board/www.google.com" target="_blank"&gt;http://forums.freescale.com/freescale/board/www.google.com&lt;/A&gt;&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I hope this helps.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Nina&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 21:47:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/I2C-IBSR-IBB-clearing-early/m-p/134652#M2111</guid>
      <dc:creator>NLFSJ</dc:creator>
      <dc:date>2007-06-09T21:47:19Z</dc:date>
    </item>
  </channel>
</rss>

