<?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>NRF52810 - No TWI signal being sent to slave accelerometer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86866/nrf52810---no-twi-signal-being-sent-to-slave-accelerometer</link><description>Hello All, 
 I have been in the process of developing a product based on the nrf52810 microcontroller. So far I have created a custom board and BLE operational and advertising. The last thing I need to do is to establish a TWI connection with my accelerometer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Apr 2022 14:08:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86866/nrf52810---no-twi-signal-being-sent-to-slave-accelerometer" /><item><title>RE: NRF52810 - No TWI signal being sent to slave accelerometer</title><link>https://devzone.nordicsemi.com/thread/363057?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 14:08:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff5da89a-9c93-43f5-a439-ce06444d9ea0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please note that we are very short staffed here in Norway due to Easter Holidays this week (and Monday next week). This will lead to a longer than usual response time. I am sorry for the inconvenience, and hence, I need to keep this short.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see that you rarely check the return values from your TWI calls, such as in line 234, to take one example:&lt;/p&gt;
&lt;p&gt;nrf_drv_twi_tx(&amp;amp;m_twi, KXTJ3_DATA_CNTL, &amp;amp;val, sizeof(val), true);&lt;/p&gt;
&lt;p&gt;does nrf_drv_twi_tx() return 0, or another (error) value?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, one &amp;quot;=&amp;quot; sign&amp;nbsp; inside an &amp;quot;if&amp;quot; will always return true, and it will set the first parameter equal to the second parameter. Try changing e.g. this one in KXTJ3_init() :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int32_t KXTJ3_init(void)
{
    int32_t result;
    int8_t control1 = 0;   
    
    result = KXTJ3_init_IC_set(&amp;amp;control1);

    if (result == KXTJ3_COMM_OK){
        result = init_setting_gval(control1);
    }

    return (result);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also see that you commented out the wait functions. Since you have an event handler for the TWI, the twi calls are not blocking, meaning it will return before the transaction is done. I suggest you wait for the&amp;nbsp;m_xfer_done to be true before you move on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>