<?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>Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42694/stuck-in-twi_transfer-when-using-ble-and-timer</link><description>Hi, 
 
 This error has been bugging me for few days and I still have no luck in troubleshooting it. 
 Recently, I just changed my work project from nrf51822 device to nrf52832. I am planning to develop a system which it could communicate with a temperature</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Feb 2019 02:11:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42694/stuck-in-twi_transfer-when-using-ble-and-timer" /><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/168964?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 02:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f55f0552-90d1-4d8c-ad96-97fb92778d20</guid><dc:creator>grabro</dc:creator><description>&lt;p&gt;Hi, finally my problem has been solved. It is not really the problem on either software and hardware layers. The problem lies on the different architecture of the 3rd party module, which causes the TWI to be malfunction. I swapped to another board as per their engineer&amp;#39;s advice and BINGO. Problem solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/167127?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 13:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77b9ce5c-f680-40ec-b6b0-bfa05b21ceef</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Ok, it looks like you are still using function names from the previous SDK, like ble_nus_string_send() instead of ble_nus_data_send(). Just make sure all of your code is consistent with the SDK you are using.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/167067?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 11:58:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:816da0ea-e0d0-41ae-bfd5-2d276ca51f1b</guid><dc:creator>grabro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In the debug mode it stucks in the TWI tx function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/167005?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 07:32:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d64c9e65-5fe6-4420-a2e7-2e90b3e6448a</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If without BLE and timer running TWI works fie,&amp;nbsp; that rules out any hardware problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you check and make sure that the program gets stuck in the set_mode function or the TWI tx in the main loop. There also you may have to remove the m_xfer_done variable check&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/167000?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 05:57:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:550d1038-732f-4bc0-a18c-90c00fbe668d</guid><dc:creator>grabro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I tried both (passing the handler and without) but it is not getting anywhere. In my latest code, I have already commented out the flag for m_mode_set_done.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have tried enabling only twi and it works (managed to jump out from the twi_transfer loop).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/166998?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 05:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a6060d4-3ed1-4193-87ce-688a0394cdf5</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the twi_init function, you have not passed the TWI handler function but at the end of the set_mode function, you are waiting for the m_mode_set_done variable to go true, which happens in the handler. Maybe that&amp;#39;s why it is stuck?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried running TWI alone, without ble and timer? Does it still get stuck?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/166789?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 10:50:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3530cb24-d811-433c-bbb7-6c59280005c5</guid><dc:creator>grabro</dc:creator><description>&lt;p&gt;Hi Hakan,&amp;nbsp;I am using&amp;nbsp;nRF5 SDK v15.2.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/166763?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 10:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fb8c8ef-6bd2-4c2a-99e8-017d6ace8a76</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello, which SDK are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/166397?ContentTypeID=1</link><pubDate>Fri, 18 Jan 2019 07:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc1063b5-172c-4245-a8ef-cd4c1eee6c1b</guid><dc:creator>grabro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. I am using a third party nrf52832 chip with external antenna. I&amp;nbsp;tried&amp;nbsp;to add the macro&amp;nbsp;or change my SCL pin to P0.02, But the problem still exists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stuck in twi_transfer() when using BLE and Timer</title><link>https://devzone.nordicsemi.com/thread/166390?ContentTypeID=1</link><pubDate>Fri, 18 Jan 2019 05:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a590a13a-927c-400e-a54f-e4a4098a5128</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you using the nrf52832-DK board?&lt;/p&gt;
&lt;p&gt;If yes, do you have &amp;quot;&lt;span&gt;&lt;strong&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;/strong&gt;&amp;quot; macro in your preprocessor symbols? That is needed to get P0.09 and P0.10 to work as GPIO.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>