<?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>Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7729/read-data-from-sensor-i2c</link><description>Hi, 
 I want read accel data from BNO055 sensor to NRF51 DK board, but SCL and SDA pins are 1 always. 
 My code is the next one: 
 #include &amp;quot;twi_master.h&amp;quot;
#include &amp;quot;twi_master_config.h&amp;quot;

#define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER_2 (7U)
#define</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Aug 2015 16:51:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7729/read-data-from-sensor-i2c" /><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27530?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 16:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:912bf6b9-4f28-4959-b83e-27ba8bd0846e</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;Thanks, your help has been very useful!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27529?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 11:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8e5cb5e-da69-4723-bdbb-43e5aa99f38e</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;For STOP condition look at &lt;a href="http://ae-bst.resource.bosch.com/media/products/dokumente/bno055/BST_BNO055_DS000_12%7E1.pdf"&gt;BNO055 datasheet&lt;/a&gt; page 92. It is common for all I2C devices&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27528?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 10:15:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce5af3c8-0295-49a0-833e-f114baa0c228</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;The solution is changing the Operating Mode to 0x00 and after, setting a Operating Mode. Now, it changes the Operating Mode fine, but it doesn&amp;#39;t read data.&lt;/p&gt;
&lt;p&gt;Can you explain me when I have to set issue_stop_condition to 0 or 1?&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;code&gt;
// Change Operating Mode
uint8_t dataW[2] = {0x3D, 0x0C};
uint8_t dataW_0[2] = {0x3D, 0x00};&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;twi_master_transfer(0X52,dataW_0,2,1);
nrf_delay_us(4000);&lt;/p&gt;
&lt;p&gt;twi_master_transfer(0X52,dataW,2,0);
nrf_delay_us(4000);&lt;/p&gt;
&lt;p&gt;// Read all data (accel, magnetometer and gyroscope).
dataW[0] = 0x08;
twi_master_transfer(0x52,dataW,1,0);
twi_master_transfer(addR,dataR,18,1);&lt;/p&gt;
&lt;p&gt;// Read Operating Mode
dataW[0] = 0x3D;
twi_master_transfer(0x52,dataW,1,0);
twi_master_transfer(addR,estado,1,1);
&amp;lt;&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27526?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 09:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7dac88d-9aa8-4e83-89b4-eeb5f7cdbc79</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;The same, it only changes the Operating Mode when I turn off the board and after, I turn on the board again...&lt;/p&gt;
&lt;p&gt;I try change the code (uint8_t dataW[2] = {0x3D, 0x02};  instead of uint8_t dataW[2] = {0x3D, 0x01}; for example) to change the Operating Mode, but it doesn&amp;#39;t work whitout turning off the board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27527?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 09:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed6e3371-12bd-4d91-a866-d1228964ae3d</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Write sequence should be&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;twi_master_transfer(,,,1);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Read sequence:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;twi_master_transfer(,,1,0); 
twi_master_transfer(,,,1);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27525?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2015 09:14:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4b21167-20da-4e02-b378-cf40da303cb3</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t work. It doesn&amp;#39;t change the operating mode. It only changes the operating mode when I turn off the board.&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;code&gt;
// Write Operating Mode
uint8_t dataW[2] = {0x3D, 0x01};
twi_master_transfer(0X52,dataW,2,0);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;// Read all data (accel, magnetometer and gyroscope).
dataW[0] = 0x08;
twi_master_transfer(0x52,dataW,1,0);
twi_master_transfer(addR,dataR,18,1);&lt;/p&gt;
&lt;p&gt;// Read Operating Mode dataW[0] = 0x3D;
twi_master_transfer(0x52,dataW,1,0);
twi_master_transfer(addR,estado,1,1);
&amp;lt;&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27524?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2015 11:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe78981b-abdd-4283-aa8d-1384db77ea9c</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been testing the sensor but there is a thing it&amp;#39;s doesn&amp;#39;t work fine. BNO055 Sensor read data depending on an operating mode.&lt;/p&gt;
&lt;p&gt;In my code, I set the Operating Mode to 0x01(ACCONLY). Sensor only should read accel data, but it read data of magnetometer and gyroscope. After, I read the operating mode register and his value is 0x0C (NDOF Mode)&lt;/p&gt;
&lt;p&gt;My code is the next one:&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	while(true){
			uint8_t addR = (0x52)|0x01; 
			uint8_t dataW[2] = {0x3D, 0x02}; 
			uint8_t dataR[18] = {0x00};
			uint8_t estado[1] = {0x00};
		

			twi_master_transfer(0X52,dataW,2,1);
			nrf_delay_us(400); 
			
			dataW[0] = 0x08;

			twi_master_transfer(0x52,dataW,1,1);

			
			uint16_t contador = 0;
			
			for(contador = 0; contador &amp;lt; 18; contador++){
			dataR[contador] = 0;
			}
			
			twi_master_transfer(addR,dataR,18,1); 
		
			printf(&amp;quot;\n\rAccelX L: %d\n\r&amp;quot;,dataR[0]);
			printf(&amp;quot;\n\rAccelX M: %d\n\r&amp;quot;,dataR[1]);
			printf(&amp;quot;\n\rAccelY L: %d\n\r&amp;quot;,dataR[2]);
			printf(&amp;quot;\n\rAccelY M: %d\n\r&amp;quot;,dataR[3]);
			printf(&amp;quot;\n\rAccelZ L: %d\n\r&amp;quot;,dataR[4]);
			printf(&amp;quot;\n\rAccelZ M: %d\n\r&amp;quot;,dataR[5]);
			printf(&amp;quot;\n\rMagX L: %d\n\r&amp;quot;,dataR[6]);
			printf(&amp;quot;\n\rMagX M: %d\n\r&amp;quot;,dataR[7]);
			printf(&amp;quot;\n\rMagY L: %d\n\r&amp;quot;,dataR[8]);
			printf(&amp;quot;\n\rMagY M: %d\n\r&amp;quot;,dataR[9]);
			printf(&amp;quot;\n\rMagZ L: %d\n\r&amp;quot;,dataR[10]);
			printf(&amp;quot;\n\rMagZ M: %d\n\r&amp;quot;,dataR[11]);
			printf(&amp;quot;\n\rGirX L: %d\n\r&amp;quot;,dataR[12]);
			printf(&amp;quot;\n\rGirX M: %d\n\r&amp;quot;,dataR[13]);
			printf(&amp;quot;\n\rGirY L: %d\n\r&amp;quot;,dataR[14]);
			printf(&amp;quot;\n\rGirY M: %d\n\r&amp;quot;,dataR[15]);
			printf(&amp;quot;\n\rGirZ L: %d\n\r&amp;quot;,dataR[16]);
			printf(&amp;quot;\n\rGirZ M: %d\n\r&amp;quot;,dataR[17]);
			
			dataW[0] = 0x3D;
			twi_master_transfer(0x52,dataW,1,1);
			twi_master_transfer(addR,estado,1,1); 
			printf(&amp;quot;\n\rEstado: %X\n\r&amp;quot;,estado[0]);
			nrf_delay_us(1000000);		
	
	}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27522?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 12:03:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38f0752d-a54b-4257-ba0b-83c5f60ba82b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Francis, could you please update this thread with latest info, if this answer helped you then please click the ✓ to the left of the answer so that others can come and look here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27521?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 22:14:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7548d084-6d02-4e87-9d14-8e9eb02140fc</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Why don&amp;#39;t you set it to the K400 macro then? And did you just say you got things to work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27520?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 21:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f67c2f12-cba9-49e2-8357-1293712b54a0</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve changed the frequency and it seems that works fine, but I need 400khz and I&amp;#39;ve set this value:&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;code&gt;&amp;gt;
NRF_TWI1-&amp;gt;FREQUENCY       = TWI_FREQUENCY_FREQUENCY_K100 &amp;lt;&amp;lt; TWI_FREQUENCY_FREQUENCY_Pos;
&amp;lt;&lt;/code&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27523?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 21:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f09d89-0980-4462-b6ec-4f430527f77b</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Also, I see from the SDK&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TWI_FREQUENCY_FREQUENCY_K100 (0x01980000UL) /*!&amp;lt; 100 kbps. */
#define TWI_FREQUENCY_FREQUENCY_K250 (0x04000000UL) /*!&amp;lt; 250 kbps. */
#define TWI_FREQUENCY_FREQUENCY_K400 (0x06680000UL) /*!&amp;lt; 400 kbps. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and your way of setting the frequency is not correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27516?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 21:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5952e3ec-4908-4e08-9a26-b35845b9b117</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;I would advise trying higher resistor values, so the SoC don&amp;#39;t need to sink so much current in order to properly pull the lines low. Can you retry with e.g 8-10k just to leave that out of the question? It should be ablet to sink the required 3.3mA, but just to make sure...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27519?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 20:56:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dae24fa4-d189-4cb1-8ea9-24ff8d628914</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;Pullups are 1k&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27518?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 18:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bcaaaaa-3c0f-48e9-9648-f88a3c9ee74d</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Again, size of external pullups?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27517?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 08:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31efecd8-de89-4936-8994-db180972bc41</guid><dc:creator>Francis</dc:creator><description>&lt;p&gt;I&amp;#39;ve tested with internal pull up and without internal pull up. Pin 07 (SCL) and 30 (SDA) are always &amp;quot;1&amp;quot;. I don&amp;#39;t find the problem...&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;code&gt;&amp;gt;
static bool twi_master_clear_bus(void)
{
uint32_t twi_state;
bool     bus_clear;
uint32_t clk_pin_config;
uint32_t data_pin_config;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Save and disable TWI hardware so software can take control over the pins.
twi_state        = NRF_TWI1-&amp;gt;ENABLE;
NRF_TWI1-&amp;gt;ENABLE = TWI_ENABLE_ENABLE_Disabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos;

clk_pin_config = \
    NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER_2];
NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER] =      \
    (GPIO_PIN_CNF_SENSE_Disabled  &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) \
  | (GPIO_PIN_CNF_DRIVE_S0D1    &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos)   \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;/*     | (GPIO_PIN_CNF_PULL_Pullup   &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)    \ */
| (GPIO_PIN_CNF_INPUT_Connect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos)   &lt;br /&gt;
| (GPIO_PIN_CNF_DIR_Output    &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;data_pin_config = \
    NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER_2];
NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER] =       \
    (GPIO_PIN_CNF_SENSE_Disabled  &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) \
  | (GPIO_PIN_CNF_DRIVE_S0D1    &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos)   \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;/*    | (GPIO_PIN_CNF_PULL_Pullup   &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)    \ */
| (GPIO_PIN_CNF_INPUT_Connect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos)   &lt;br /&gt;
| (GPIO_PIN_CNF_DIR_Output    &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TWI_SDA_HIGH();
TWI_SCL_HIGH();
TWI_DELAY();

if ((TWI_SDA_READ() == 1) &amp;amp;&amp;amp; (TWI_SCL_READ() == 1))
{
    bus_clear = true;
}
else
{
    uint_fast8_t i;
    bus_clear = false;

    // Clock max 18 pulses worst case scenario(9 for master to send the rest of command and 9
    // for slave to respond) to SCL line and wait for SDA come high.
    for (i=18; i--;)
    {
        TWI_SCL_LOW();
        TWI_DELAY();
        TWI_SCL_HIGH();
        TWI_DELAY();

        if (TWI_SDA_READ() == 1)
        {
            bus_clear = true;
            break;
        }
    }
}

NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER_2] = clk_pin_config;
NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER_2]  = data_pin_config;

NRF_TWI1-&amp;gt;ENABLE = twi_state;

return bus_clear;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;bool twi_master_init_2(void)
{
/* To secure correct signal levels on the pins used by the TWI
master when the system is in OFF mode, and when the TWI master is
disabled, these pins must be configured in the GPIO peripheral.
&lt;em&gt;/
NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER] =     &lt;br /&gt;
(GPIO_PIN_CNF_SENSE_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) &lt;br /&gt;
| (GPIO_PIN_CNF_DRIVE_S0D1     &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos) &lt;br /&gt;
/&lt;/em&gt;      | (GPIO_PIN_CNF_PULL_Pullup    &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)  \ */
| (GPIO_PIN_CNF_INPUT_Connect  &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos) &lt;br /&gt;
| (GPIO_PIN_CNF_DIR_Input      &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_GPIO-&amp;gt;PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER] =      \
    (GPIO_PIN_CNF_SENSE_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) \
  | (GPIO_PIN_CNF_DRIVE_S0D1     &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos) \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;/*      | (GPIO_PIN_CNF_PULL_Pullup    &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)  \ */
| (GPIO_PIN_CNF_INPUT_Connect  &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos) &lt;br /&gt;
| (GPIO_PIN_CNF_DIR_Input      &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_TWI1-&amp;gt;EVENTS_RXDREADY = 0;
NRF_TWI1-&amp;gt;EVENTS_TXDSENT  = 0;
NRF_TWI1-&amp;gt;PSELSCL         = TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER_2;
NRF_TWI1-&amp;gt;PSELSDA         = TWI_MASTER_CONFIG_DATA_PIN_NUMBER_2;
NRF_TWI1-&amp;gt;FREQUENCY       = 400000; //TWI_FREQUENCY_FREQUENCY_K100 &amp;lt;&amp;lt; TWI_FREQUENCY_FREQUENCY_Pos
NRF_PPI-&amp;gt;CH[0].EEP        = (uint32_t)&amp;amp;NRF_TWI1-&amp;gt;EVENTS_BB;
NRF_PPI-&amp;gt;CH[0].TEP        = (uint32_t)&amp;amp;NRF_TWI1-&amp;gt;TASKS_SUSPEND;
NRF_PPI-&amp;gt;CHENCLR          = PPI_CHENCLR_CH0_Msk;
NRF_TWI1-&amp;gt;ENABLE          = TWI_ENABLE_ENABLE_Enabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos;

return twi_master_clear_bus();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}
&amp;lt;&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read data from sensor i2c</title><link>https://devzone.nordicsemi.com/thread/27515?ContentTypeID=1</link><pubDate>Sat, 20 Jun 2015 23:08:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:154a0fe3-dae7-4fcd-8de1-0cf1b43496a2</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Size of Rpull1/2? And I guess there&amp;#39;s no reason for internal pull-up on your pins when you have external ones. I guess the internal pullups also might break your circuitry since they they will be connected in parallell with the external pullups&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>