<?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>Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58746/not-responding-twi-peripheral</link><description>Hi all, 
 Here I am using the nrf52840 in my customized board, in parallel i have nrf52840 dev board. 
 I am using the twi peripheral to communicate with a i2c based sensor. To test the board, I am using the nRF52840 SDK 15.2. 
 In the dev board it is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Mar 2020 15:50:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58746/not-responding-twi-peripheral" /><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238584?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 15:50:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:783bea41-7c93-4ba5-b3eb-cfb8ff8cf13f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Gouse Basha"]This example is working fine with Dev board of nRF52840. In my custom board it is not working.[/quote]
&lt;p&gt;This suggest that the connections between the nRF52840 and the sensor might be incorrect.&lt;br /&gt;Could you provide schematics for how the sensor is wired to the nRF52840 on the custom board?&lt;/p&gt;
[quote user="hnhoan"]Check to make sure you have pullup resistors on the SDA &amp;amp; SCL line on your custom board also check other pins such as CS wiring to put the sensor in I2C mode instead of SPI[/quote]
&lt;p&gt;Please ensure that this is the case on your custom board, and get back to us.&lt;br /&gt;&lt;br /&gt;Thank you for your suggestion, Nguyen!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238505?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 11:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba65e11f-466d-445f-8698-642c63306a9a</guid><dc:creator>Gouse Basha</dc:creator><description>&lt;p&gt;&lt;strong&gt;Could you elaborate what you are trying to achieve here, and how the performance differs from what you would expect?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My objective is to establish the communication with TWI with the i2c based sensor. For that, I opted the &lt;strong&gt;twi scanner&lt;/strong&gt; example. Whenever the device&amp;nbsp;id matches, it will make flag as high.&amp;nbsp; So that we can ensure that device has found.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This example is working fine with Dev board of nRF52840. In my custom board it is not working.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Basha&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238497?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 10:54:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30973d81-72be-419e-a54d-f5c5798ec57d</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Check to make sure you have pullup resistors on the SDA &amp;amp; SCL line on your custom board also check other pins such as CS wiring to put the sensor in I2C mode instead of SPI&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238495?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 10:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25e11627-d327-4e1d-9b8a-0a926d7cb4d3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Do I understand you correctly that you are trying to use the nRF52840 as a TWI Master, to read data from a specific TWI slave sensor?&lt;br /&gt;If this is the case, you might be interested in seeing the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/twi_sensor_example.html"&gt;twi_sensor example&lt;/a&gt;&amp;nbsp;rather than the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/twi_scanner_example.html"&gt; twi_scanner example&lt;/a&gt;.&lt;br /&gt;The twi_sensor example demonstrates how to set up the nRF52840 as a TWI Master, and receive data from a arbitrary TWI slave sensor.&lt;br /&gt;In the example, a LM75B temperature sensor is used for reference.&lt;/p&gt;
&lt;p&gt;[quote user="Gouse Basha"][/quote]&lt;/p&gt;
&lt;p&gt;I am using this function&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;err_code = nrf_drv_twi_rx(&amp;amp;m_twi, address, &amp;amp;sample_data, sizeof(sample_data));&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can you please suggest me.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you elaborate what you are trying to achieve here, and how the performance differs from what you would expect?&lt;br /&gt;The twi driver functions are described in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fgroup__nrf__drv__twi.html"&gt;TWI API Reference&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238419?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 04:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d756fc-b7cb-46d6-8673-40c674865ad5</guid><dc:creator>Gouse Basha</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here I am using the TWI Scanner example provided in the SDK of the nRF52840. In this, i changed the GPIO numbers as per my custom board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SCL as 6 and SDA as 8. After changing this pins, i checked with both Dev board and Custom board. In the &lt;span&gt;Dev&amp;nbsp;&lt;/span&gt;board, it is working fine where as in the custom board it is not working.&lt;/p&gt;
&lt;p&gt;In the &lt;span&gt;Dev&amp;nbsp;&lt;/span&gt;board I am using a sensor by connecting them externally via jumper wires. In the custom board, the sensor is different one, populated on the the board.&lt;/p&gt;
&lt;p&gt;While checking the custom board, it is not returning from the while loop&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Error-in-Scanner-code_5F00_1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I am using this function&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;err_code = nrf_drv_twi_rx(&amp;amp;m_twi, address, &amp;amp;sample_data, sizeof(sample_data));&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can you please suggest me.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not responding twi  peripheral</title><link>https://devzone.nordicsemi.com/thread/238342?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 14:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b091269e-0950-4acb-b75f-f3dc1ff6837d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Could you elaborate on what application you are using to test this - are you using the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/twi_sensor_example.html"&gt;twi_sensor example&lt;/a&gt; from the SDK?&lt;br /&gt;If so, what modifications have you made to it?&lt;/p&gt;
[quote user=""]In the dev board it is working fine. But in the custom board it is not working.&amp;nbsp;[/quote]
&lt;p&gt;This suggest that it could be a problem with the connections, please ensure that the connections are correct between the nRF52840 and the sensor.&lt;br /&gt;Could you describe how it does not work on the custom board? Is the sensor unresponsive, or are you seeing a difference in the TWI communication when using the custom board instead?&lt;/p&gt;
[quote user=""]This is the issue I am getting with my custom board.[/quote]
&lt;p&gt;It would also be preferable if you could provide some more insight into what issue you are facing. From the provided screenshot you are highlighting the &lt;em&gt;nrf_twim_event_check&lt;/em&gt; inline function, which is used as a boolean check for twim events. &lt;br /&gt;Could you instead provide the code where&amp;nbsp;it&amp;nbsp;is called, along with a description of the problem you are experiencing. Is the application stuck in a loop, or are you getting an unexpected return value somewhere?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>