<?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>Bluetooth LE  nRF52840 - Switch BLE Advertising Interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123796/bluetooth-le-nrf52840---switch-ble-advertising-interval</link><description>Hi, 
 I am developing a small app for the nRF52840 using the SDK V3.1.0 and the Visual studio Code on a PC windows 11. 
 What I like to do is to be able with the app to change the BLE Advertising Interval by just pressing the buttons. 
 I am not too familiar</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Aug 2025 15:09:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123796/bluetooth-le-nrf52840---switch-ble-advertising-interval" /><item><title>RE: Bluetooth LE  nRF52840 - Switch BLE Advertising Interval</title><link>https://devzone.nordicsemi.com/thread/546084?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2025 15:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a593932-d0ff-4305-8167-5f12dfb80757</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.4/page/zephyr/connectivity/bluetooth/api/gap.html#c.bt_le_adv_start"&gt;bt_le_adv_start()&lt;/a&gt; cannot be called from interrupt context, so that instead you should perform the actions of (stopping and) starting advertising in a &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/kernel/services/threads/workqueue.html"&gt;workqueue thread&lt;/a&gt;. See &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/kernel/services/threads/workqueue.html#how_to_use_workqueues"&gt;How to Use Workqueues&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>