<?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>Talking to an EEPROM via TWI using the NRF51DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12579/talking-to-an-eeprom-via-twi-using-the-nrf51dk</link><description>I&amp;#39;m trying to use the NRF51DK to talk to this EEPROM ( www.st.com/.../CD00290537.pdf) . I&amp;#39;ve started by trying to modify the twi sensor example. One of the things that&amp;#39;s different from the example code with the accelerometer is that this EEPROM requires</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 May 2016 10:27:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12579/talking-to-an-eeprom-via-twi-using-the-nrf51dk" /><item><title>RE: Talking to an EEPROM via TWI using the NRF51DK</title><link>https://devzone.nordicsemi.com/thread/47776?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 10:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b14291c9-3f39-4b78-bc73-573dea474a27</guid><dc:creator>Brook Gebremedhin</dc:creator><description>&lt;p&gt;@olba ,
i don&amp;#39;t find any where a working makefile that has twi and soft device enabled.
can you direct me to a working makefile that  has twi and softdvice together ?
thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Talking to an EEPROM via TWI using the NRF51DK</title><link>https://devzone.nordicsemi.com/thread/47775?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2016 17:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:492d1db7-3974-4206-adc9-71e91404f176</guid><dc:creator>bneil</dc:creator><description>&lt;p&gt;Great, thanks, that took care of it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Talking to an EEPROM via TWI using the NRF51DK</title><link>https://devzone.nordicsemi.com/thread/47774?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2016 14:47:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1613a555-50b6-4f49-85ac-6fc4b619d9ee</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;nrf_drv_twi_tx(..) needs and array of bytes/uint8_t not a uint32_t. With your code it will just send out 0 (the lowest 8 bits of the variable). Change to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static uint8_t outgoing data[3] = {0x00, 0x80, 0xAA};

err_code = nrf_drv_twi_tx(&amp;amp;twi_driver, M24M02_ADDR, outgoing_data, sizeof(outgoing_data), false);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;0x00 and 0x80 may need to be switched depending if the device needs MSB or LSB first. The array needs to be static or decleared outside of main() to not be placed on the stack (placed in RAM -&amp;gt; not removed after it is used). The last parameter needs to be false if you are not going to do a repeated transfer (tx + rx without issuing a stop condition in between).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>