<?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 communication failes after soft reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55569/twi-communication-failes-after-soft-reset</link><description>Hi community, 
 in our setup we use the LSM6DSL IMU using TWI. First we initialize the TWI peripheral, then we configure the IMU. After that we initialize PPI to automatically request information from the IMU once the IMU&amp;#39;s interrupt pin toggles from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2019 09:11:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55569/twi-communication-failes-after-soft-reset" /><item><title>RE: TWI communication failes after soft reset</title><link>https://devzone.nordicsemi.com/thread/226050?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 09:11:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f4346d9-bb2a-4140-be42-6db6835754c6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Christian,&lt;/p&gt;
&lt;p&gt;Glad to hear that you found the problem. Is it possible that you may have had an ongoing TWI transaction when you initiated DFU, and that is why the bus gets &amp;quot;stuck&amp;quot;? Or maybe the same IOs are used for something else in DFU mode? Anyway, I don&amp;#39;t see any drawbacks in enabling this option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI communication failes after soft reset</title><link>https://devzone.nordicsemi.com/thread/225878?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 12:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6981af19-ec55-4ab0-989d-21ba65f2203f</guid><dc:creator>chrizz</dc:creator><description>&lt;p&gt;Vidar, thanks you for your efforts so far.&lt;/p&gt;
&lt;p&gt;We meanwhile figured out that enabling the bus clearing procedure during init (&lt;em&gt;clear_bus_init=true&lt;/em&gt; in &lt;em&gt;nrf_drv_twi_config_t&lt;/em&gt; &lt;em&gt;&lt;/em&gt;) solves the problem. (similar to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33466/twi-clearing-bus-with-nrfx_twi-driver/128785#128785"&gt;this&lt;/a&gt; issue)&lt;/p&gt;
&lt;p&gt;This problem wasn&amp;#39;t present when we were using TWI in blocking mode only. But after switching to PPI based (non-blocking) mode it obviously seems to be necessary (in our setup) to clear the bus on init. I assume the slave starts &amp;quot;talking&amp;quot; with the first clock signal (after soft reset) und therefore it disturbs &lt;em&gt;nrf_drv_twi_tx()&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Christian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI communication failes after soft reset</title><link>https://devzone.nordicsemi.com/thread/225743?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 17:10:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a84ddb6b-9f9f-4343-9ef6-6f73cf6df29f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming the SDK version. Is the driver configured in blocking or non-blocking mode (&lt;a title="TWI master" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/hardware_driver_twi.html?cp=6_5_9_2_18"&gt;TWI master&lt;/a&gt;) and how is it powered,&amp;nbsp; is it through a GPIO pin?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;Edit: No longer relevant, but just to clarify that by &amp;quot;&lt;span&gt;and how is it powered,&amp;nbsp; is it through a GPIO pin?&lt;/span&gt;&amp;quot; I meant to ask if the sensor was powered through another GPIO pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI communication failes after soft reset</title><link>https://devzone.nordicsemi.com/thread/225735?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 16:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e1a8e71-5006-45e4-b813-d2aef8e9f944</guid><dc:creator>chrizz</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/55569/twi-communication-failes-after-soft-reset/225658"]Do you know if the error is returned from the&amp;nbsp;&amp;nbsp;&lt;em&gt;nrf_drv_twi_tx()&lt;/em&gt; function or if it&amp;#39;s notified through your TWI callback&lt;em&gt;?&lt;/em&gt;[/quote]
&lt;p&gt;It seems likes &lt;em&gt;nrf_drv_twi_tx()&lt;/em&gt; does not return.&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/55569/twi-communication-failes-after-soft-reset/225658"]&lt;em&gt;&lt;/em&gt;Also, are you using the TWI driver from the SDK, or your own?[/quote]
&lt;p&gt;I&amp;#39;m using the driver from the SDK (12.2.0)&lt;/p&gt;
&lt;p&gt;Regard&lt;/p&gt;
&lt;p&gt;Christian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI communication failes after soft reset</title><link>https://devzone.nordicsemi.com/thread/225658?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 13:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21a0b79b-75a4-48dd-bc94-acad8ced33f2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Christian,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The application&amp;#39;s reset handler will re-load everything to RAM on before entering main(), so I don&amp;#39;t think that&amp;#39;s the issue. Do you know if the error is returned from the&amp;nbsp;&amp;nbsp;&lt;em&gt;nrf_drv_twi_tx()&lt;/em&gt; function or if it&amp;#39;s notified through your TWI callback&lt;em&gt;? &lt;/em&gt;Also, are you using the TWI driver from the SDK, or your own?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>