<?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>Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49415/multi-advertising-non-connectable-and-connectable-are-blocking-cpu-on-nrf52840</link><description>Hello, 
 In our project there is a problem that we encountered is happening when the Nordic BLE mesh advertising and connectable advertising for GATT connections are enabled in the same time. This problem is behaving by blocking the access to CPU for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Jul 2019 08:07:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49415/multi-advertising-non-connectable-and-connectable-are-blocking-cpu-on-nrf52840" /><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196763?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 08:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40cbe0b0-ba9b-4d3a-9fea-8b9397b0fa51</guid><dc:creator>Catalin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;We manage to work around this delay but again we hit and we need to resolve this, since we updated to nRF Mesh 3.1 and SDK 15.3&lt;/p&gt;
&lt;p&gt;Here&amp;nbsp;are the interrupt priority registers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Timer1 has interrupt priority 1 and at each 415 us it toggles a pin. As you can see in the first message there are gaps that are around 15ms in toggling.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c2247d29d7fb43a08cdc363eb76a5fa8/iprn_5F00_registers.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem as we talked is due to coexistence of SDK BLE and Mesh in the situation that they are both advertising.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;Catalin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196762?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 12:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f608a311-2f83-4fd0-95c6-c37da762b32c</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;I have a couple of suggestions that you can try out and see if that solves your problem:&lt;/p&gt;
&lt;p&gt;- It might be an irq priority issue, check out &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v2.1.1/md_doc_getting_started_mesh_interrupt_priorities.html?cp=4_1_1_3_3" rel="noopener noreferrer" target="_blank"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;- This might also help,&amp;nbsp;&lt;span&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v2.1.1/md_doc_getting_started_how_to_nordicSDK.html?cp=4_1_1_3_6" rel="noopener noreferrer" target="_blank"&gt;Coexistence with nRF5 SDK BLE functionality&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- There is a new Mesh SDK out, &lt;a href="https://www.nordicsemi.com/eng/nordic/download_resource/62377/44/13395201/126781" rel="noopener noreferrer" target="_blank"&gt;v2.2.0&lt;/a&gt;. Try the coexistence example and see if it changes anything.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196761?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 14:39:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd9a4fbf-0dc1-4524-9742-432fec44a031</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the late repsonse.&lt;/p&gt;
&lt;p&gt;I have been sick and haven&amp;#39;t been able to look further into the issue. I will have a look at it on Monday.&lt;/p&gt;
&lt;p&gt;Sorry for the inconvenience.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196760?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 10:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f01245-57d6-4ff6-bd86-13ca0e5d3d21</guid><dc:creator>Catalin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I do not have any progress!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; I have TIMER1 interrupt at 415us that is toggling a pin and this pin&amp;nbsp; is monitored with a logic analyzer. And as you can see in the screen shots posted first time the interrupt is masked for too long. I do not have any other code just the 2 advertisings with GATT Softdevice (using ble_advertising.c module) and with Mesh.&lt;/p&gt;
&lt;p&gt;/Catalin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196759?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 10:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d8e0b5c-3976-403e-8769-bfceb0601c24</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you had any progress with the issue?&lt;/p&gt;
&lt;p&gt;How do you check that the CPU is blocked?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196758?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 11:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a66a0529-3551-44e8-bbdb-cdb90af7d7d6</guid><dc:creator>Catalin</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; I have tried a few advertising connectable solutions, even the one from the proxy. In the attachment you can see the lastest inspired from the coexist examples available in NRF Mesh SDK 2.1.1,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * advert.c
 *
 *  Created on: Aug 24, 2018
 *      Author: Cata
 */

//#include &amp;quot;ble_advdata.h&amp;quot;
#include &amp;quot;ble_advertising.h&amp;quot;
#include &amp;quot;mesh_adv.h&amp;quot;
#include &amp;quot;timer_scheduler.h&amp;quot;
#include &amp;quot;gatt_util.h&amp;quot;
#include &amp;quot;dara.h&amp;quot;
#include &amp;quot;utils.h&amp;quot;

#include &amp;quot;nrf_sdh_ble.h&amp;quot;
#include &amp;quot;nrf_sdh_soc.h&amp;quot;

#include &amp;quot;log.h&amp;quot;

#define MESH_ADV_ADV_TYPE 					BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED
#define MESH_ADV_DATA_SIZE_MAX 				BLE_GAP_ADV_SET_DATA_SIZE_MAX
#define ADV_NETWORK_ITERATE_INTERVAL_US     SEC_TO_US(10)

#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(500, UNIT_1_25_MS)        /**&amp;lt; Minimum acceptable connection interval (0.5 seconds).  */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(1000, UNIT_1_25_MS)       /**&amp;lt; Maximum acceptable connection interval (1 second). */
#define SLAVE_LATENCY                   0                                       /**&amp;lt; Slave latency. */
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)         /**&amp;lt; Connection supervisory timeout (4 seconds). */

#define APP_ADV_INTERVAL                800                                     /**&amp;lt; The advertising interval (in units of 0.625 ms. This value corresponds to 500 ms). */
#define APP_ADV_DURATION                BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED   /**&amp;lt; Disable advertising timeout. */

//#define APP_ADV_INTERVAL                	391                                     /**&amp;lt; The advertising interval (in units of 0.625 ms; this value corresponds to 40 ms). */
//#define APP_ADV_DURATION                	BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED   /**&amp;lt; The advertising time-out (in units of seconds). When set to 0, we will never time out. */

extern st_Dara_t g_stDara;
extern ble_util_t m_util;

BLE_ADVERTISING_DEF(m_advertising);                     /**&amp;lt; Advertising module instance. */

/**@brief Function for handling advertising events.
 *
 * @param[in] ble_adv_evt  Advertising event.
 */
static void on_adv_evt(ble_adv_evt_t ble_adv_evt)
{
    ret_code_t err_code;

    switch (ble_adv_evt)
    {
        case BLE_ADV_EVT_FAST:
            break; // BLE_ADV_EVT_FAST

        case BLE_ADV_EVT_IDLE:
            break; // BLE_ADV_EVT_IDLE

        default:
            break;
    }
}

void advertising_init(void)
{
	ret_code_t             err_code;
	ble_advertising_init_t init;
    ble_advdata_t srdata;
    ble_advdata_manuf_data_t manufdata;
    ble_gap_addr_t addr;

    uint8_t mandata[6] = {0, 0, 0, 0, 0, 0};
    ble_uuid_t m_adv_uuids[] = {{UTIL_UUID_SERVICE, m_util.uuid_type}};

	memset(&amp;amp;init, 0, sizeof(init));

 	memset(&amp;amp;init.srdata, 0, sizeof(init.srdata));
 	init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
 	init.srdata.uuids_complete.p_uuids  = m_adv_uuids;

	init.advdata.name_type               = BLE_ADVDATA_SHORT_NAME;
	init.advdata.short_name_len     = 4;

	//init.advdata.include_appearance      = false;
	//init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
	//init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
	//init.advdata.uuids_complete.p_uuids  = m_adv_uuids;

	init.advdata.p_manuf_specific_data = &amp;amp;manufdata;

    manufdata.company_identifier = ACCESS_COMPANY_ID_DARA;
    manufdata.data.size = 6;

	g_stDara.m_uiNodeid = (uint16_t)((*(uint32_t*) &amp;amp;NRF_FICR-&amp;gt;DEVICEID[0]) &amp;amp; 0x3FFF);
    mandata[4] = g_stDara.m_uiNodeid;
    mandata[5] = (uint8_t)(g_stDara.m_uiNodeid &amp;gt;&amp;gt; 8);

	manufdata.data.p_data =  mandata;

	init.config.ble_adv_fast_enabled  = true;
	init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
	init.config.ble_adv_fast_timeout  = APP_ADV_DURATION;

	init.evt_handler = on_adv_evt;

	err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
	APP_ERROR_CHECK(err_code);

	ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}

/**@brief Function for starting advertising.
 */
void advertising_start(bool erase_bonds)
{
    uint32_t err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196757?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 13:42:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cd7d03d-1662-477b-9299-560f0cba1106</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How are you using both Mesh and&amp;nbsp;connectable advertising for GATT connections at the same time? Are you using the timeslot API?&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;TIMESLOT_REQ_EARLIEST_TIMEOUT_US matches the blocked interval, I suspect that the request of the earliest timeslot isn&amp;#39;t handled somewhere in your application. Can you see if this is the case?&lt;/p&gt;
&lt;p&gt;Also which Mesh example are you running?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196756?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 15:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39bf29f2-4015-47ce-9268-44c695a075ee</guid><dc:creator>Catalin</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; The blocking interval and the TIMESLOT_REQ_EARLIEST_TIMEOUT_US (mesh-SDK/mesh/core/src/timeslot.c) definition (15ms) are in directed connection. Setting the TIMESLOT_REQ_EARLIEST_TIMEOUT_US to a different value the blocking interval goes to that defined value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Can you give me some hints regarding of what is happening in this timeslot and why the mesh without the gatt advertising does not get this blocking CPU period?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Our custom advertising is connectable and it has&lt;/p&gt;
&lt;p&gt;#define APP_ADV_INTERVAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400&lt;br /&gt;#define APP_ADV_DURATION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Catalin&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi advertising non connectable and connectable are blocking CPU on nrf52840</title><link>https://devzone.nordicsemi.com/thread/196755?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 10:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f93ebdc-e7da-4bb1-82da-b7229d7ed8d5</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems high with 15.3ms. I&amp;#39;m not sure what is causing this, but you can start by debugging the code and see where it hangs?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Martin&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>