<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24153/twi_master_with_twis_slave---incorrect-eeprom-data</link><description>Greetings,
I am interfacing AT24C01A(EEPROM) with nRF52 ,SDK11,PCA10040. 
 For writing to the EEPROM and reading data fromn EEPROM, I am using the following code, 
 I have attached images of read function and write function.Kindly have a look.
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Aug 2017 19:05:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24153/twi_master_with_twis_slave---incorrect-eeprom-data" /><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95111?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 19:05:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b97097c-852f-4870-af3c-b28b22fcd5b2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Arun, it would be helpful if you have a logic analyzer or similar to probe the TWI pins and listen to its traffic. It will tell you quite clearly why the eeprom is not responding. I am guessing that your EEPROM is nacking every command send from the TWI master due to wrong configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95109?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 13:09:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d37d24f-f8b9-4196-b2ac-24b6ca86eb6b</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;you need to also remove &amp;quot;case x&amp;quot; - it uses simulated eeprom.
And you also have to remove:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   if(eeprom_simulator_error_check())
    {
        printf(
                &amp;quot;WARNING: EEPROM transmission error detected.\n&amp;quot;
                &amp;quot;Use &amp;#39;x&amp;#39; command to read error word.\n\r&amp;quot;
        );
        UNUSED_VARIABLE(fflush(stdout));
    }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95108?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 12:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc85432b-6cc6-4023-ba8a-47cc1cdc8fea</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Minimum what you shall do is to remove:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* Initializing simulated EEPROM */
err_code = eeprom_simulator_init();
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You also can remove:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;quot;eeprom_simulator.h&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unfortunately I don&amp;#39;t have possibility to check this today but it is quite likely it will work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95107?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 12:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f516bbdf-6409-4abb-a51b-bcda2b0cdb13</guid><dc:creator>Arun</dc:creator><description>&lt;p&gt;I am using nRF5_SDK_11.0.0_89a8197.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95113?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 12:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4582e7c7-af27-46d9-8c39-3082c07de314</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;In which  SDK version you would like to modify the example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95110?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 12:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a894b636-2d65-4c3e-ac04-246f08bfbf33</guid><dc:creator>Arun</dc:creator><description>&lt;p&gt;I have NRF_SUCCESS in all transactions.
My eprom device memory can hold 256 Byte data.I am looking at simulator eeprom simulated example from the sdk. what changes do i need to make in the file to read data from the eeprom device.
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95112?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 11:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:832dd695-3e56-4114-88f8-882afcffd43d</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;does &amp;quot;ret&amp;quot; provide any error indication or you have NRF_SUCCESS during read and write operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95106?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 10:12:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab7cdd05-4423-4e55-9e74-bcd9f522d747</guid><dc:creator>Arun</dc:creator><description>&lt;p&gt;I also programmed the same EEPROM device with an arduino to write data and tried reading the data with nrf52,but i am reading incorrect data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95105?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 10:09:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a459ffa4-d877-4b85-a005-bd0cea3adbd5</guid><dc:creator>Arun</dc:creator><description>&lt;p&gt;Thanks for the response.I have communication with the EEPROM device.
But the problem is I cannot read and write.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: twi_master_with_twis_slave - incorrect EEPROM data</title><link>https://devzone.nordicsemi.com/thread/95104?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 10:04:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc865ea-7f6b-46b2-9bf4-ec9a5a93a562</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I see in your screens correctly you are using SDK11. Do you have any communication with EEPROM?
You can try TWI Scanner example to check if connection is fine. But it is available in newer SDK: SDK12/SDK13/SDK14  (\sdk\nrf5\examples\peripheral\twi_scanner)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>