<?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: IIC (I2C) SDA Line always low?? in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140546#M3128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the input.&amp;nbsp; Was a hardware fault.&amp;nbsp;&amp;nbsp;One of the i2c digipots (ad5242) was faulty on my board.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jun 2006 19:21:05 GMT</pubDate>
    <dc:creator>JonHart</dc:creator>
    <dc:date>2006-06-26T19:21:05Z</dc:date>
    <item>
      <title>IIC (I2C) SDA Line always low??</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140543#M3125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am having some difficutly talking to an IIC device. As soon as I set the BEN (IIC enable bit) the IBB (bus busy bit) gets set and never clears.&amp;nbsp; Since this is the first check done in any transfer, I'm rather stuck.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;code:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;void IIC_Start(unsigned int adr) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;&amp;nbsp;cpuIBFD = 0x1b;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;//****HELP - STUCK IN THIS WHILE LOOP!****&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;while(cpuIBSR &amp;amp; 0x20);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// wait for IBB flag to clear&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;// NEVER GET TO HERE &lt;A href="http://forums.freescale.com/i/smilies/16x16_smiley-sad.gif"&gt;&lt;IMG border="0" height="16" src="http://forums.freescale.com/i/smilies/16x16_smiley-sad.gif" width="16" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;cpuIBCR |= 0x30;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// set TX and master mode&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;cpuIBDR = 0x18|(adr &amp;lt;&amp;lt; 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 0x18 = %00011[00/01]0&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;while((cpuIBSR &amp;amp; 0x02) == 0);&amp;nbsp; // wait for IBIF flag to be set&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;&amp;nbsp;cpuIBSR |= 0x02;&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; // clear IBIF flag&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;I&amp;nbsp;have checked the SDA line and it is always low (even on a processor reset).&amp;nbsp; Is this normal?&amp;nbsp; I am wondering if there is a hardware fault.&amp;nbsp; I have 10K pull ups on SDA and SCL.&amp;nbsp; The bus length is a few cm and there are two devices on the bus.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Jon&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2006 00:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140543#M3125</guid>
      <dc:creator>JonHart</dc:creator>
      <dc:date>2006-06-22T00:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: IIC (I2C) SDA Line always low??</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140544#M3126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Sorry but I had to replace the MCU when that happened to me. I don't know if there are other things that might be wrong, though.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 06:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140544#M3126</guid>
      <dc:creator>imajeff</dc:creator>
      <dc:date>2006-06-23T06:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: IIC (I2C) SDA Line always low??</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140545#M3127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How have you declared "cpuIBSR"?&lt;BR /&gt;It should be declared as "volatile" to ensure that the compiler is not optimising to read the value once and then running in the while loop with this value and never seeing that the bit has changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise maybe there is really a hardware problem...(?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark Butcher&lt;BR /&gt;&lt;A href="http://www.mjbc.ch/"&gt;www.mjbc.ch&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2006 00:52:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140545#M3127</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2006-06-24T00:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: IIC (I2C) SDA Line always low??</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140546#M3128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the input.&amp;nbsp; Was a hardware fault.&amp;nbsp;&amp;nbsp;One of the i2c digipots (ad5242) was faulty on my board.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 19:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IIC-I2C-SDA-Line-always-low/m-p/140546#M3128</guid>
      <dc:creator>JonHart</dc:creator>
      <dc:date>2006-06-26T19:21:05Z</dc:date>
    </item>
  </channel>
</rss>

