<?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 Scanner works on nRF52 DK, doesn&amp;#39;t work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41278/twi-scanner-works-on-nrf52-dk-doesn-t-work-on-3rd-party-modules</link><description>I&amp;#39;ve been trying to get TWI Sensor to work on 3rd party boards for a while now and no luck. 
 The code I&amp;#39;m using is only slightly modified, (1) it explicitly defines .scl and .sda pins in main.h 
 
 (2) it takes the scanner that happens once on startup</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Dec 2018 05:22:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41278/twi-scanner-works-on-nrf52-dk-doesn-t-work-on-3rd-party-modules" /><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/161583?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 05:22:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b927303-7787-4c54-927e-0385702ac4b8</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;This &lt;a href="https://www.tindie.com/products/hnhoan/nano-size-ant-bluetooth5-arm-m4f-30-io-module/"&gt;nRF52832 module&lt;/a&gt; works!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/161575?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 02:52:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9361eedd-3613-4d6d-8881-38b0e7a48eef</guid><dc:creator>Austin Fennacy</dc:creator><description>&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;I decided step through the application in debug mode, working with the Sparkfun 3rd party nRF52832 module (see OP). The only change I&amp;#39;ve made to the code was enabling NRF_LOG_BACKEND_RTT_ENABLING in sdk_config.h so I can step through in the Debug Terminal:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After doing that and setting a breakpoint on the &amp;quot;NRF_LOG_FLUSH();&amp;quot; right after &amp;quot;if (err_code == NRF_SUCCESS)&amp;quot;, ...&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;while (true)
    {
        detected_device = false;

        for (address = 0x67; address &amp;lt;= 0x69; address++)
        {
            err_code = nrf_drv_twi_rx(&amp;amp;m_twi, address, &amp;amp;sample_data, sizeof(sample_data));
            if (err_code == NRF_SUCCESS)
            {
                detected_device = true;
                NRF_LOG_INFO(&amp;quot;TWI device detected at address 0x%x.&amp;quot;, address);
            }
            NRF_LOG_FLUSH();
        }
        if (!detected_device)
        {
            NRF_LOG_INFO(&amp;quot;No device was found.&amp;quot;);
            NRF_LOG_FLUSH();
        }
        nrf_delay_ms(500);
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;...&amp;nbsp;I stepped through until &amp;quot;address&amp;quot; read a value &amp;quot;0x68&amp;quot;, and the I2C sensor was actually recognized in terminal! I can even remove the breakpoint and press &amp;quot;play&amp;quot; and it works 100% normally, printing &amp;quot;&amp;lt;info&amp;gt; app: TWI device detected at address 0x68.&amp;quot; every half-second just like it should have in the COM port.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/device-is-found-in-Debug-Terminal.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;However, after exiting debug mode and opening the COM port in Docklight, without changing a single thing in my setup, once again the Sparkfun 3rd party module prints &amp;quot;No device was found.&amp;quot; Huh??&lt;/p&gt;
&lt;p&gt;So it seems as though this code works in the Debug Terminal, but not in the COM port. I am very confused. &lt;strong&gt;Why could this be happening?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;...so now that I know I can (sometimes?) communicate with I2C devices, I&amp;#39;m going to move on and try to read registers and see if I can send it over Bluetooth. While proving communication with the device is possible is progress, I would really&amp;nbsp;like to understand why this bug occurs, otherwise the same exact thing could happen when I&amp;#39;m trying to send data over Bluetooth.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/161312?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 23:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86356452-b8f9-4e70-ad46-8f2fcbc792b8</guid><dc:creator>Austin Fennacy</dc:creator><description>&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;All sensors are powered directly from the DK, so even when an external module is being used, the power rails all come from VDD on the DK, and not &amp;quot;bottlenecked&amp;quot; through the external board.&lt;/p&gt;
&lt;p&gt;I mentioned the modifications I made to the SDK example and attached my project file in a ZIP to the OP, but it&amp;#39;s virtually unchanged (just a slight mod to make it repeatedly print I2C devices instead of only printed once). I experienced the same problems with the 100% unmodified code too, however.&lt;/p&gt;
&lt;p&gt;When the I2C data line is hooked up to two devices and get&amp;#39;s pulled low twice, instead of once for one device, does that indicate that the MCU is acknowledging the I2C slave? or does the slave pull the data line low and it&amp;#39;s possible that the MCU isn&amp;#39;t &amp;quot;listening&amp;quot;?&lt;/p&gt;
&lt;p&gt;Do you have any other recommendations for debugging? Have you gotten this code to work with 3rd party modules? Do you think I should try stepping through the code by using the external debugger? Or perhaps I should try to communicate directly with the modules (check the WHO_AM_I register) to see if perhaps there&amp;#39;s just a bug with the code but I2C itself is functional ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/161274?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 16:18:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:421e48f8-d86a-4626-b10e-41bd50e3c922</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I cannot see any reasons that the modules should not be able to detect the sensors. Are the sensors powered directly from VDD on the 52-DK? Are you testing with the unmodified example from the SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/160816?ContentTypeID=1</link><pubDate>Fri, 07 Dec 2018 22:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f36bd85f-de89-4c17-be42-d155c6123d6d</guid><dc:creator>Austin Fennacy</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen, sorry for the late reply, I was out of office yesterday.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What voltage are you running the boards/modules on?&amp;nbsp;What kind of sensors are you interfacing, and how are these powered?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When I&amp;#39;m powering the I2C devices (the two devices are an MPU6050, I2C address 0x68 in this case, and an LSM6DS3, I2C address 0x6B in this case), no matter what nRF module I&amp;#39;m testing code on, I am always powering them from VDD of the nRF52 DK. When I probed this voltage using my DMM, I read 2.80V.&lt;/p&gt;
&lt;p&gt;I am also powering the&amp;nbsp;&lt;a href="https://www.sparkfun.com/products/13990"&gt;Sparkfun nRF52832 Breakout&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;the&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.fanstel.com/bt832-1-1/"&gt;BT832&lt;/a&gt;&amp;nbsp;with the 2.80V VDD originating from the nRF52 DK. So all nRF and I2C modules are being powered from the same voltage generated from the nRF52 DK.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Can you post screenshots of the scope communication with DK and the modules?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sure. These are some very low-resolution screenshots that lets you see the whole signal in clusters, but I will also attach a high-resolution sampling of the first part of the first cluster of pulses (as high res as I could capture with my oscilloscope without signal aliasing).&lt;/p&gt;
&lt;p&gt;DK with 2 I2C devices attached:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/DK_5F00_with_5F00_2_5F00_i2c.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;DK with 1 I2C device attached:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/DK_5F00_with_5F00_1_5F00_i2c.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;DK zoomed in on SCL/SDA lines:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/zoomed_5F00_in_5F00_signal.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;COM Port when DK is configured and I2C is working:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/com_5F00_port_5F00_output_5F00_nRF52DK_5F00_when_5F00_I2C_5F00_works.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Sparkfun nRF52 Breakout Board with 2 I2C devices attached:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/sparkfun_5F00_with_5F00_2_5F00_i2c.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Sparkfun nRF52 Breakout Board with 1 I2C device attached:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/sparkfun_5F00_with_5F00_1_5F00_i2c.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Sparkfun nRF52 Breakout Board zoomed in on SCL/SDA lines:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/20181207_5F00_144037.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;COM Port when Sparkfun is configured and I2C communication is not working:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/com_5F00_port_5F00_output_5F00_Sparkfun_5F00_nRF52_5F00_breakout_5F00_when_5F00_I2C_5F00_does_5F00_not_5F00_work.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;And the BT832 also had identical characteristics to the DK and Sparkfun board when interacting with 1 or 2 I2C devices.&lt;/p&gt;
&lt;p&gt;I have also attached samples from both the DK and Sparkfun board, they capture the first couple thousand points after the scope triggers on the first cluster of pulses.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any ideas on what I can fix to get the Sparkfun or BT832 to recognize the I2C devices? It looks like there is some interaction happening, they share similar characteristics when moving between 1 and 2 I2C devices...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF52_5F00_DK_5F00_with_5F00_working_5F00_I2C.CSV"&gt;devzone.nordicsemi.com/.../nRF52_5F00_DK_5F00_with_5F00_working_5F00_I2C.CSV&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Sparkfun_5F00_nRF52_5F00_breakout_5F00_with_5F00_broken_5F00_I2C.CSV"&gt;devzone.nordicsemi.com/.../Sparkfun_5F00_nRF52_5F00_breakout_5F00_with_5F00_broken_5F00_I2C.CSV&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Scanner works on nRF52 DK, doesn't work on 3rd Party Modules</title><link>https://devzone.nordicsemi.com/thread/160569?ContentTypeID=1</link><pubDate>Thu, 06 Dec 2018 12:32:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12681736-9768-4a98-a308-11354c8e9558</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What voltage are you running the boards/modules on?&lt;/li&gt;
&lt;li&gt;Can you post screenshots of the scope communication with DK and the modules?&lt;/li&gt;
&lt;li&gt;What kind of sensors are you interfacing, and how are these powered?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>