<?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>Starting a new thread from a BLE callback</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76308/starting-a-new-thread-from-a-ble-callback</link><description>I have a BLE service: 
 
 BT_GATT_SERVICE_DEFINE (lres_svc, 
 BT_GATT_PRIMARY_SERVICE ( BT_UUID_LRES ), 
 BT_GATT_CHARACTERISTIC ( BT_UUID_LRES_STAT , BT_GATT_CHRC_NOTIFY , 
 BT_GATT_PERM_NONE , NULL , NULL , NULL ), 
 BT_GATT_CCC ( lec_ccc_cfg_changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Jun 2021 11:29:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76308/starting-a-new-thread-from-a-ble-callback" /><item><title>RE: Starting a new thread from a BLE callback</title><link>https://devzone.nordicsemi.com/thread/315097?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 11:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bd5de0e-93a1-499b-8714-4fa873dd61d3</guid><dc:creator>bachelor</dc:creator><description>&lt;p&gt;Also this is a duplicate, because I couldnt edit the tags (which I forgot to include here). So maybe it could be deleted...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Starting a new thread from a BLE callback</title><link>https://devzone.nordicsemi.com/thread/315096?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 11:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4da8dc00-c067-4f8f-a7bf-8dd34f6ae6e4</guid><dc:creator>bachelor</dc:creator><description>&lt;p&gt;Found the problem now: thread_data was declared inside the callback function, so it lies at address &amp;amp;thread_data on the Bluetooth stack . It is therefore not a valid address for other threads. As a consequence the MPU recognizes a memory access violation. When I declared it outside the callback function the problem went away.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>