<?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>Interrupts in Application with LIS2DH12, TWI, and BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39888/interrupts-in-application-with-lis2dh12-twi-and-ble</link><description>Hi everyone, 
 I am using a chip nRF52832 reading data from LIS2DH12 via TWI (all in a custome boad), then data will be send to Master nRF52832 DK ia BLE_NUS. However, when I use the interrupt pin in LIS2DH12, BLE will stop advertising. When I turn off</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Nov 2018 15:26:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39888/interrupts-in-application-with-lis2dh12-twi-and-ble" /><item><title>RE: Interrupts in Application with LIS2DH12, TWI, and BLE</title><link>https://devzone.nordicsemi.com/thread/156358?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 15:26:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcdd55f8-9eae-490d-b176-05fa61bf6fd5</guid><dc:creator>Milo311</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yep. I will upload the code in a private ticket.&lt;/p&gt;
&lt;p&gt;Thanks so much for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupts in Application with LIS2DH12, TWI, and BLE</title><link>https://devzone.nordicsemi.com/thread/156357?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 15:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e42cd1b8-6d93-4ff2-9e13-40073b63bfb3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is difficult to say anything specific without seeing your code. Can you upload it?&lt;/p&gt;
&lt;p&gt;Without knowing more, it would be tempting to think that you wait for something that does not happen for some reason. For instance, it could be that you wait for a variable to change state in a event handler that should be set in another, and this is not volatile. Or that an event handler spends too much time doing some other stuff for some reason.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupts in Application with LIS2DH12, TWI, and BLE</title><link>https://devzone.nordicsemi.com/thread/156272?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 09:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abec7166-2cb0-44b2-8281-96ad38d2b47d</guid><dc:creator>Milo311</dc:creator><description>&lt;p&gt;Thanks for your reply. Sorry for my late response.&lt;/p&gt;
&lt;p&gt;In the&amp;nbsp;&lt;span&gt;nrf_drv_twi_config_t instance, I config&amp;nbsp;TWI_DEFAULT_CONFIG_IRQ_PRIORITY = 2 and the&amp;nbsp;TWI_DEFAULT_CONFIG_IRQ_PRIORITY in your projects sdk_config.h is 7.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the TWI event handler, I&amp;nbsp; use&amp;nbsp;NRF_DRV_TWI_XFER_TX and&amp;nbsp;NRF_DRV_TWI_XFER_RX with 2 flags notifying the transfer done.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tried to change the priority.&amp;nbsp;The application still stops in interrupt of LIS2DH12. If the priority is 2, application can work without the&amp;nbsp;interrupt of LIS2DH12.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The interrupt in LIS2DH12 is configuring an IO pin as a positive edge triggered interrupt source in order to send data from sensor to microcontroller. In addiiton, the priority of GPIOTE = 2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have any other suggestions for me?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupts in Application with LIS2DH12, TWI, and BLE</title><link>https://devzone.nordicsemi.com/thread/154879?ContentTypeID=1</link><pubDate>Mon, 29 Oct 2018 13:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9919980-0e3c-407e-83be-d77d5404c14c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should not have any problems using both BLE and TWI. Do you do a lot of time consuming stuff in the TWI event handler? All event handlers are running in interrupt context, so that could be a problem. What is the interrupt priority of TWI in your application? That is typically set by&amp;nbsp;TWI_DEFAULT_CONFIG_IRQ_PRIORITY in your projects sdk_config.h or perhaps possibly set directly by setting the&amp;nbsp;interrupt_priority field in the&amp;nbsp;nrf_drv_twi_config_t instance you pass to&amp;nbsp;nrf_drv_twi_init() (depending on your application).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>