<?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>i2c and nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16053/i2c-and-nrf52832</link><description>Hello! 
 I want to connect the MCP9808 with the nrf52832. Therefor I use i2C.
My example on the nrf52832 is the: 
 &amp;lt;nRF5_SDK_v11_0_0 folder&amp;gt;\examples\ble_peripheral\experimental_ble_app_eddystone\
 
 Now, I have written the code of the twi_sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Sep 2016 08:47:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16053/i2c-and-nrf52832" /><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61219?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2016 08:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73e99e1a-b7f1-41b3-96c3-8e3b6f1a60de</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;Ok, now it works, thanks. Only the debugger (Keil) shows a false value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61222?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2016 07:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c3c35c1-67d2-4c9a-83d2-ee3b30e258ec</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;Part of the new code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define DEVICE_SCL_PIN 11
#define DEVICE_SDA_PIN 12
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks for answer!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61221?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2016 07:34:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c624b21f-2410-4baa-9346-a2aca6f063a4</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;When I use the nrf52 DK and change the pins, there is the same problem.&lt;/p&gt;
&lt;p&gt;Is it a problem to change the following thing (in nrf_drv_config.h):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TWI0_ENABLED 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TWI0_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have connected:&lt;/p&gt;
&lt;p&gt;DK		MCP9808&lt;/p&gt;
&lt;p&gt;Udd		VDD&lt;/p&gt;
&lt;p&gt;GND		GND&lt;/p&gt;
&lt;p&gt;P0.11		SCL&lt;/p&gt;
&lt;p&gt;P0.12		SDA&lt;/p&gt;
&lt;p&gt;GND		A0&lt;/p&gt;
&lt;p&gt;GND		A1&lt;/p&gt;
&lt;p&gt;GND		A2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61220?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 14:24:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92f0b55a-0468-4a8f-9c1e-a7e219998407</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You are using P0.00 and P0.01 for TWI, these are also used for the 32KHz crystal. Probably this is why it does not work. Try changing to other pins that are not used already (check on the back of the DK).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61218?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2016 17:18:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bead1519-9f7d-46f9-a8e0-7dafe181ff40</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;I have tested it with an oscilloscope. The SDA and SCL Pins were continuous 3V. Than I have changed the pull-up to pull-down resistors, and now the clock works and I get a (wrong) signal. Maybe the capacity of the capacity is too high.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61217?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 11:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fb58986-7c69-4f07-9113-eb91cd4f771d</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;That should not be a problem. Have you tested the code while in debug to see if the code is acting as it should and have you tested with an oscilloscope or logic analyzer attached to the lines to see if the nRF is actually trying to read the device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61216?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 09:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:285bc27b-1097-42ae-83c9-82ee51a36c48</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;Is it possible, that there is a problem, when I took the pointer of the m_sample into a uint8_t?&lt;/p&gt;
&lt;p&gt;Debugger: m_sample 0x20001872 (Location)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61223?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 08:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac32b0fb-8df0-48b4-90f3-d56fd9c69ec2</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;The function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_drv_twi_rx(&amp;amp;m_twi_mcp9808, TEMP_ADDR, (uint8_t*)&amp;amp;m_sample, sizeof(m_sample));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;does not write in the m_sample.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61215?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 07:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b4635bc-06b7-4b63-a7e5-470e4aaa0e29</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;I have set pull-up on the pins, but the nothing changed.
It used 100kHz.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61212?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2016 09:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2367cc33-bcad-4662-b260-af3b3a81990a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You can set pull-up on the pin with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_GPIO-&amp;gt;PIN_CNF[SDA_PIN] |= (GPIO_PIN_CNF_PULL_Pullup &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos);
NRF_GPIO-&amp;gt;PIN_CNF[SCL_PIN] |= (GPIO_PIN_CNF_PULL_Pullup &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you can check the NRF_GPIO-&amp;gt;PIN_CNF[n] register if pull-up is used (see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpio.html?cp=2_2_0_19_2_9#register.PIN_CNF-0"&gt;here&lt;/a&gt; for the register description).&lt;/p&gt;
&lt;p&gt;Be aware that the typical value of the pull-up resistor is 13KOhm. This can work at 100kHz, but at 400KHz the pull is too weak which will result in a skewed signal on the clock line (it is an RC circuit). Recommended value for pull-up resistor on TWI is about 4.7KOhm.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61213?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2016 06:19:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d672c691-78fd-4b21-bc21-6eb728205a73</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;I wanted to use the internal GPIO pull up resistors. How could I check, if they are configure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c and nrf52832</title><link>https://devzone.nordicsemi.com/thread/61214?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2016 10:39:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b14369c-473a-416e-82a3-e122e6944ea7</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;It is not obvious what the problem is here. I suggest that you probe the lines using a logic analyzer or oscilloscope to see if the temp sensor is actually responding.&lt;/p&gt;
&lt;p&gt;If the device does not respond the address may be incorrect or you forgot to add external pull-up resistors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>