<?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>Other NXP ProductsのトピックPPC 8270: I2C Initialization</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161354#M842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;I am trying to get I2C to work on PowerPC 8270.&amp;nbsp;&lt;FONT size="2"&gt;I think I have everything set up according the reference manual, but apparently I am missing something. Here is what I am doing:&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;On pin port D:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PDIRD bits 14 and 15 clear&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PPARD bits 14 and 15 set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PSORD bits 14 and 15 set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PODRD bits 14 and 15 set (I think these don't matter when special function bits are enabled)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The I2C anchor location at IMMR + 0x8AFC is set to 0x9000, which is where I want the I2C parameter block to go.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At IMMR + 0x9000, I have set up rbase and tbase to point with 0x1000 and 0x1080, which puts my BD arrays for rx and tx at IMMR + 0x1000 and IMMR + 0x1080 respectively. I have set rfcr and tfcr in the parameter block to BO = 1 and T2 set (all other bits clear). I've tried the T2 bit both ways.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;All rx BD's are configured with their E-bits set. All tx BD's are configured with their R-bit clear and their S, and L bits set. Last BDs in both rx and tx arrays are configured with their W-bit set.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I am issuing the code to CPCR (IMMR + 0x119C0) with the values from table 14-6:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PAGE = 0b1010&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;SBC = 0b1011&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;FLG set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am seeing the CP clear the FLG bit after this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2COM is then set to master mode (bit 7 set).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2BRG is set to 208 (calculated to give 100 kbaud when predivider is 4)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2CMR and I2CER are written with all condition bits set (this should set them in I2CMR and clear them in I2CER).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2MOD predivider field is set to 0b11 to get a pre-divider of 4.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I set the EN bit in I2MOD, and the initialization is assumed to be complete.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;On the test bench I have pin port D bits 14 and 15 pulled up with 10K resistors. I have the scope monitoring both of those pins.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The test transmission is effected setting the first tx buffer with the target slave address in the first byte and two data bytes following. The byte count field in the corresponding BD is set to 3. Then I set the R bit in the corresponding tx BD. Then I set STS in I2COM.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I am expecting to see the transmission on the scope and the CP to reset the R bit and set the NAK bit, since there is no device out there to answer.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;But none of this happens.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is there an app-note that has sample initialization code for this device? There is surely something I have neglected to do here, but I can't figure out what it is.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Karl&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Karl_H on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-12-14&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;04:07 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2009 23:57:56 GMT</pubDate>
    <dc:creator>Karl_H</dc:creator>
    <dc:date>2009-12-14T23:57:56Z</dc:date>
    <item>
      <title>PPC 8270: I2C Initialization</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161354#M842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;I am trying to get I2C to work on PowerPC 8270.&amp;nbsp;&lt;FONT size="2"&gt;I think I have everything set up according the reference manual, but apparently I am missing something. Here is what I am doing:&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;On pin port D:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PDIRD bits 14 and 15 clear&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PPARD bits 14 and 15 set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PSORD bits 14 and 15 set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PODRD bits 14 and 15 set (I think these don't matter when special function bits are enabled)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The I2C anchor location at IMMR + 0x8AFC is set to 0x9000, which is where I want the I2C parameter block to go.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At IMMR + 0x9000, I have set up rbase and tbase to point with 0x1000 and 0x1080, which puts my BD arrays for rx and tx at IMMR + 0x1000 and IMMR + 0x1080 respectively. I have set rfcr and tfcr in the parameter block to BO = 1 and T2 set (all other bits clear). I've tried the T2 bit both ways.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;All rx BD's are configured with their E-bits set. All tx BD's are configured with their R-bit clear and their S, and L bits set. Last BDs in both rx and tx arrays are configured with their W-bit set.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I am issuing the code to CPCR (IMMR + 0x119C0) with the values from table 14-6:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;PAGE = 0b1010&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;SBC = 0b1011&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;FLG set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I am seeing the CP clear the FLG bit after this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2COM is then set to master mode (bit 7 set).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2BRG is set to 208 (calculated to give 100 kbaud when predivider is 4)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2CMR and I2CER are written with all condition bits set (this should set them in I2CMR and clear them in I2CER).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I2MOD predivider field is set to 0b11 to get a pre-divider of 4.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I set the EN bit in I2MOD, and the initialization is assumed to be complete.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;On the test bench I have pin port D bits 14 and 15 pulled up with 10K resistors. I have the scope monitoring both of those pins.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The test transmission is effected setting the first tx buffer with the target slave address in the first byte and two data bytes following. The byte count field in the corresponding BD is set to 3. Then I set the R bit in the corresponding tx BD. Then I set STS in I2COM.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;At this point I am expecting to see the transmission on the scope and the CP to reset the R bit and set the NAK bit, since there is no device out there to answer.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;But none of this happens.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is there an app-note that has sample initialization code for this device? There is surely something I have neglected to do here, but I can't figure out what it is.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Karl&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Karl_H on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-12-14&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;04:07 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 23:57:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161354#M842</guid>
      <dc:creator>Karl_H</dc:creator>
      <dc:date>2009-12-14T23:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: PPC 8270: I2C Initialization</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161355#M843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ADDENDUM: I just noticed that I'm getting an indication of SDMA error on the local bus in register SDSR (IMMR + 0x11018). This is strange because in the tcfr field of the parameter block, I am putting a 0 in bit 6 (DTB; should select the 60x bus). I've checked the errata and there is nothing about this bit being other than 0 for 60x and 1 for local bus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 01:35:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161355#M843</guid>
      <dc:creator>Karl_H</dc:creator>
      <dc:date>2009-12-15T01:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: PPC 8270: I2C Initialization</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161356#M844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Found the problem. Had the I2C anchor at IMMR + 8AFC declared at a word instead of a half word. Now that it's fixed, my I2C works as expected.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2009 22:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PPC-8270-I2C-Initialization/m-p/161356#M844</guid>
      <dc:creator>Karl_H</dc:creator>
      <dc:date>2009-12-15T22:15:40Z</dc:date>
    </item>
  </channel>
</rss>

