<?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>Can&amp;#39;t using TWIM in BLE event handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87708/can-t-using-twim-in-ble-event-handler</link><description>MCU : nrf52833 
 SDK : Ver 17.1.0 
 SoftDevice : S140 
 
 I try to call RTC value to external RTC Module by TWIM in BLE authentication rw request event. 
 But MCU stop to call TWIM and looks like waitting TWIM done event. 
 
 I think problem is priority</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 May 2022 07:53:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87708/can-t-using-twim-in-ble-event-handler" /><item><title>RE: Can't using TWIM in BLE event handler</title><link>https://devzone.nordicsemi.com/thread/367319?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 07:53:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c83f9950-1507-417f-b49f-f86347c085d2</guid><dc:creator>Olfox</dc:creator><description>&lt;p&gt;Hi Jorgen !&lt;/p&gt;
&lt;p&gt;Thanks a lot for this tips.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After fighting days on that, i can conclude you are 100% right:&lt;/p&gt;
&lt;p&gt;!!!!!!!!!&amp;nbsp; &amp;nbsp; if you use TWIM, JUST ROMOVE ALL THE TWI STUFF FROM YOUR SDK_CONFIG.H !!!!!!!!!!!!&lt;/p&gt;
&lt;p&gt;Otherwise you will get headhack and white hair before the end of the day. I started from twi_example, try to keep the sdk_config.h used etc.... But at the end, ( at least for nrf52833) TWi is depracated according to the documentation and also all the functions like nrf_driver tx or rx are depracated and docuementation advice to use nrfx_twim_xfer function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't using TWIM in BLE event handler</title><link>https://devzone.nordicsemi.com/thread/366901?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 11:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdc74e9f-535d-4a50-83ff-5580a22c506d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I agree that it sounds like a priority issue.&lt;/p&gt;
&lt;p&gt;Are you using the nrfx_twim API directly in your application, or do you use the legacy nrf_drv_twi API? Note that&amp;nbsp;&lt;span&gt;NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY will be redefined in apply_old_config.h&amp;nbsp;to the value of&amp;nbsp;TWI_DEFAULT_CONFIG_IRQ_PRIORITY if TWI_ENABLED is&amp;nbsp;&lt;em&gt;defined&lt;/em&gt; in your sdk_config.h file, regardless if&amp;nbsp;TWI_ENABLED is set to 1 or 0. If you are using nrfx APIs, you need to completely remove the legacy configs from your sdk_config.h file to get the NRFX configs working correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>