<?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>LPCXpresso IDEのトピックRe: lpcxpresso 1769 eeprom</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541735#M7553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 11:31:16 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok. Attached you will find the zip file containing a simple project, that doesn't work :) Help me find out why, please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the CMSIS1.3 example project pca8581_polling as reference (also attached).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:47:58 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:47:58Z</dc:date>
    <item>
      <title>lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541730#M7548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Sun Jul 22 12:17:39 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to access my onboard epprom, to store some config data on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a MC24LC64 eeprom. It's connected to P0[19](SDA) and P0[20](SCL) pina on the processor. So I think it's I2C1 - accoring to the manual (LPC1769_68_67_66_65_64_63.pdf)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know Rob has written a driver and it works, but I'm trying to use CMSIS1.3 as I already have it in my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't make it work. I don't get any errors but I can't read any data back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the address is 1010 + 3 address bits A0,A1,A2 (eeprom doc), 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // which are soldered to ground on lpc1769, so 1010000 -&amp;gt; 0x50
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define MC24LC64_ADDR 0x50 /* I2C address of the 24LC64 EEPROM */

// setup pins for i2c
PinCfg.OpenDrain = 1;
PinCfg.Pinmode = 0;
PinCfg.Funcnum = 2;
PinCfg.Pinnum = 19;
PinCfg.Portnum = 0;
PINSEL_ConfigPin(&amp;amp;PinCfg);
PinCfg.Pinnum = 20;
PINSEL_ConfigPin(&amp;amp;PinCfg);
// Initialize Slave I2C peripheral
I2C_Init(LPC_I2C1, 120000);
/* Enable Slave I2C operation */
I2C_Cmd(LPC_I2C1, ENABLE);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 0x00 offset of the memory to write / read
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 0xfc - some random data to write and read back
uint8_t Buf8[4] = {0x00, 0xfc}; 
uint8_t Recv[8] = {0,0,0,0,0,0,0,0};

transferMCfg.sl_addr7bit = MC24LC64_ADDR;
transferMCfg.tx_data = Buf8;
transferMCfg.tx_length = 2;
transferMCfg.rx_data = NULL;
transferMCfg.rx_length = 0;
transferMCfg.retransmissions_max = 3;
I2C_MasterTransferData(LPC_I2C1, &amp;amp;transferMCfg, I2C_TRANSFER_POLLING);

transferMCfg.sl_addr7bit = MC24LC64_ADDR;
transferMCfg.tx_data = Buf8;
transferMCfg.tx_length = 1;
transferMCfg.rx_data = Recv;
transferMCfg.rx_length = 1;
transferMCfg.retransmissions_max = 3;
I2C_MasterTransferData(LPC_I2C1, &amp;amp;transferMCfg, I2C_TRANSFER_POLLING);
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now every time I run this code I get Recv[0] = 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me understand what I'm doing wrong. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541730#M7548</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541731#M7549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Sun Jul 22 14:38:24 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you shift the address 0x50 one position to the left? :confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do you set the read/write bit? If you just use an AND or OR to set or reset the read/write bit then you shoudl use 0xA0 as address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We need to see more of the code to be able too give you an answer and to help you. ;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So please export your project to a zip file and post it here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Serge&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541731#M7549</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541732#M7550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 02:06:43 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok. I will do so in the evening, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541732#M7550</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541733#M7551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Polux rsv on Mon Jul 23 04:54:03 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Drag,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the examples I sent you weeks (month) ago. :D&amp;nbsp; The IMU offset data are stored in the on-board eeprom. I used Rob65 I2C driver. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Angelo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541733#M7551</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541734#M7552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 08:12:54 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Angelo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it's based on Robs work - I have it and I've tested it - it works. I just want to use the cmsis driver :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ps: how's your TC? You never told me if my code worked ok for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541734#M7552</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541735#M7553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 11:31:16 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok. Attached you will find the zip file containing a simple project, that doesn't work :) Help me find out why, please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the CMSIS1.3 example project pca8581_polling as reference (also attached).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541735#M7553</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541736#M7554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cmcquaid on Mon Jul 23 12:56:43 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;P0.19 and P0.20 are set to reserved rather than SCL/SDA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;PinCfg.Funcnum = 2;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should be&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;PinCfg.Funcnum = 3;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That fixes the write...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The read will fail unless you put in a delay to allow the write to complete...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541736#M7554</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541737#M7555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 13:29:47 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow, thanks. It's almost working now :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I added a small delay between write and read and now both functions return with success, however the Rcv is filled with 0xff and it should be filled with { 0xfc, 0xfd, 0xfe, 0xff }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: changing the contents of Snd to something else, like { 0x00, 0xaa, 0xbb, 0xcc, 0xdd } doesn't make a difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;edit2: where can I find this info that funcnum 2 is "reserved"?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:47:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541737#M7555</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541738#M7556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 13:54:39 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok. I've got it. The address is 16bit, not 8bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I should trasmit 2 address bytes when reading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyways, please tell me where can I find the information about funcum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the LPC1769_68_67_66_65_64_63.pdf there are 3 functions listed by P0[19] and P0[20]. I thought the functions would be indexed from 0, so I2C1 would be 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For I2C0 (in my other project) I use pins 27 and 28 and funcum 1 and it works. In pdf (page 11) the function SDA0 is the middle one (from 3 - P0[27]/SDA0/USB_SDA)... So my theory is incosistent :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541738#M7556</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541739#M7557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cmcquaid on Mon Jul 23 16:12:13 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;UM10360&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC17xx User manual&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rev. 2 — 19 August 2010&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Page 108. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;8.5.2 Pin Function Select Register 1 (PINSEL1 - 0x4002 C004)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd post the relevant table but it doesn't paste nice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Conor&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541739#M7557</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: lpcxpresso 1769 eeprom</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541740#M7558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dragilla on Mon Jul 23 23:25:11 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, Found it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For those who also might be looking: UM10360.pdf, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8.5.2. Pin Function Select Register 1 (PINSEL1 - 0x4002 C004) - page 107&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the thread is complete :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &amp;amp; C'ya&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:48:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpcxpresso-1769-eeprom/m-p/541740#M7558</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:48:01Z</dc:date>
    </item>
  </channel>
</rss>

