<?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>Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43800/internal-clock-twi-issue</link><description>I have an issue with the internal clock setting, and TWI. My custom board has an issue with the external crystal. So I switched to internal crystal with the following settings: 
 NRF_SDH_CLOCK_LF_SRC 0 
 NRF_SDH_CLOCK_LF_RC_CTIV 2 
 NRF_SDH_CLOCK_LF_RC_TEMP_CTIV</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Feb 2019 11:29:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43800/internal-clock-twi-issue" /><item><title>RE: Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/thread/171861?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 11:29:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d70c3d92-9517-48ff-bd85-db51cf7d0b4a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please check out the answer in this thread:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21891/nrf_error_drv_twi_err_anack-in-blocking-mode"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/21891/nrf_error_drv_twi_err_anack-in-blocking-mode&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It could be that you are writing the wrong commands, but if it works from a DK, it sounds like this isn&amp;#39;t the issue. Can you check the datasheet on the sensor that you are communicating with? Maybe the voltage is just below the required voltage?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/thread/171804?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 07:52:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:775416c7-ee51-4a44-b868-8ade1384cd31</guid><dc:creator>Vijay_L</dc:creator><description>&lt;p&gt;The function NRF_DRV_TWI_TX returns this value. So basically it fails sending the first packet after init&lt;/p&gt;
&lt;p&gt;Yes it&amp;#39;s exactly the same device an accelerometer which I am trying to write. I have not desoldered the pullup resistors, but the resistance between Vcc and SCL/SDA line at testpoint is the same as the other PCB&lt;/p&gt;
&lt;p&gt;I observed that the SCL, SDA voltage is about 0.3V less than the other board, but its still about 3V. I am currently in a different city in India, so I do not have access to an Oscilloscope. But as soon as I get back I will try to upload some screenshots&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/thread/171706?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 16:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4a75dd8-9cdc-44bf-aa29-92b608efc96a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What function is&amp;nbsp;returning&amp;nbsp;this value? Or what event is receiving this value? Is it the same device that you are trying to write to using TWI? What are the differences between the two boards on the TWI pins? The TWI isn&amp;#39;t using the LFCLK, so it is not related to that at all. The LFCLK is 37KHz, so it couldn&amp;#39;t possibly drive a TWI clock of 100KHz.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/thread/171699?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 15:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd5ca5b3-6485-46e3-9ba0-2bc4f7d6b1a6</guid><dc:creator>Vijay_L</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;My Twi init config is as follows:&lt;/p&gt;
&lt;pre&gt;twi_config = {
       .scl                = 26,
       .sda                = 27,
       .frequency          = NRF_DRV_TWI_FREQ_100K,
       .interrupt_priority = APP_IRQ_PRIORITY_LOW,
       .clear_bus_init     = true
    };&lt;/pre&gt;
&lt;p&gt;It works in another Custom board with the same configuration and a functioning external crystal, so I assumed it maybe a crystal issue.&amp;nbsp;I just checked with the DK and it works. So it&amp;#39;s not due to the internal oscillator I guess.&lt;/p&gt;
&lt;p&gt;I get the&amp;nbsp;&lt;span&gt;NRF_ERROR_DRV_TWI_ERR_ANACK err_code i.e. 0x8201 on the custom board. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you suggest where to troubleshoot? Should I check the pullup resistors?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vijay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal Clock TWI issue</title><link>https://devzone.nordicsemi.com/thread/171682?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 14:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd95a0a7-2fe2-4314-b2b7-72afe5e320ac</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;How have you enabled the TWI? Did you test the TWI (your application)&amp;nbsp;on a DK? Does it work there? Are you sure that you have not set up the TWI wrong, rather than clock settings?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>