<?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>Transmiting only slave address on TWI I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54242/transmiting-only-slave-address-on-twi-i2c</link><description>Hello I am using a I2C sensor module and I need to tranmit only address to receive data back, but I dont know how. 
 
 
 Program crashes on line 4. 
 Thank you for your help.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Nov 2019 12:15:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54242/transmiting-only-slave-address-on-twi-i2c" /><item><title>RE: Transmiting only slave address on TWI I2C</title><link>https://devzone.nordicsemi.com/thread/220556?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 12:15:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af2451e6-3f12-4acc-989a-8c7b011d2b55</guid><dc:creator>mojangeex</dc:creator><description>&lt;p&gt;Sorry for late response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;     uint8_t dra[0] ={};
     err_code = nrf_drv_twi_tx(&amp;amp;m_twi, 0xE1,dra,1,false);
      APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Application does not crash with above code, but I2C device still does not work. I will investigate further and report when I solve it.&lt;br /&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmiting only slave address on TWI I2C</title><link>https://devzone.nordicsemi.com/thread/219719?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 15:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65bbb4ac-535c-475a-af78-51402e0322a2</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Fatal Error means that the nrf_drv_twi_tx has returned a non-zero error code and this is being caught by the APP_ERROR_CHECK call. Which return code is&amp;nbsp;&lt;span&gt;nrf_drv_twi_tx&amp;nbsp; returning? You should be able to see this when debugging the application. My guess it that its&amp;nbsp;NRF_ERROR_INVALID_PARAM, i.e. 0x07. If that is the case then try passing an empty buffer instead of a NULL pointer.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmiting only slave address on TWI I2C</title><link>https://devzone.nordicsemi.com/thread/219622?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 09:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:806b3876-cc01-4834-b976-eb53ac177462</guid><dc:creator>mojangeex</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;I am running SDK 15.3 and nRF52832 DK.&lt;/p&gt;
&lt;p&gt;Code compiles sucessfully, but the program crashes at executing that line.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = nrf_drv_twi_tx(&amp;amp;m_twi, 0xE1,NULL,0,true);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;00&amp;gt; error&amp;gt; app: Fatal error&lt;/p&gt;
&lt;p&gt;00&amp;gt; warning&amp;gt; app: System reset&lt;/p&gt;
&lt;p&gt;I need to send message without data frame.&lt;/p&gt;
&lt;p&gt;On arduino there is an example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; Wire.beginTransmission((uint8_t)_i2caddr);
    Wire.write((uint8_t)reg); //This send the command to get data
    Wire.write(0x0);
    Wire.write(0x0);
    Wire.write(0x0);
    Wire.write(0x0);
    Wire.write(0x0);
    Wire.endTransmission();
    
    Wire.beginTransmission(0xE1);
    Wire.endTransmission();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmiting only slave address on TWI I2C</title><link>https://devzone.nordicsemi.com/thread/219602?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 08:30:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8203ac64-0ad4-4285-860f-96019198536a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI mojoangeex,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do not think you can send only the address as message going out on the bus will need to contain the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start condition&lt;/li&gt;
&lt;li&gt;Stop condition&lt;/li&gt;
&lt;li&gt;Read and write bits&lt;/li&gt;
&lt;li&gt;ACK/NACK bits&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Address of the Slave&lt;/li&gt;
&lt;li&gt;Data frame&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which SDK version are you using and which nRF device is it running on? Does&amp;nbsp;nrf_drv_twi_tx( return an error code? If so, which? It could be that you have to point to an empty buffer rather than passing a NULL pointer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = nrf_drv_twi_tx(&amp;amp;m_twi, 0xE1,NULL,0,true);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>