<?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>Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74593/getting-error-0x0f-while-running-two-tasks-parallelly-on-ble_app_hrs_freertos</link><description>I have two tasks and I want to run those tasks one after the other. 
 currently when I comment on one of the task, the firmware running without any error. 
 if run those two parallelly I&amp;#39;m getting error APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN); error code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Apr 2021 07:38:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74593/getting-error-0x0f-while-running-two-tasks-parallelly-on-ble_app_hrs_freertos" /><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307604?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 07:38:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a220b45a-cb9f-46ab-958b-72e41072caa2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Right, missed to see that.&lt;/p&gt;
&lt;p&gt;Then i do not know why the scheduler just exits and return. I have not seen this before unless scheduler bailed because of insufficient RAM. Check if you have enough heap allocated in FreeRTOSConfig.h file and see if the tasks have enough stack size reserved (which is allocated from the kernel heap)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307516?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 13:48:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c6335bd-e05d-480c-80a5-f888c6840121</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;for those tasks, I have separate function definitions ble_Send_thread and vib_function.&lt;/p&gt;
&lt;p&gt;In that function i have while(1)loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307513?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 13:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cb9bf99-fb77-4868-a2e7-06581c73c7b1</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;BLETASK and pollTASK need to have While(1) before the function ends. These are task functions, they cannot exit unless freertos scheduler wants them to&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307504?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 13:14:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f2606c7-00fc-495a-9d94-634fee299ca6</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;sorry i didn&amp;#39;t get you can you explain a bit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307493?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:46:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1265c528-4af0-4d07-a9c1-d648f7a2da30</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The tasks functions cannot end like that, you need to have a loop in every task that does not allow the function to exit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307469?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bea06e76-0fb9-463a-9789-460fdec66f8a</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;void BLETASK(void)&lt;br /&gt;{&lt;br /&gt; if (pdPASS != xTaskCreate(ble_send_thread, &amp;quot;device&amp;quot;, 256, NULL, 1, &amp;amp;n_ble_thread))&lt;br /&gt; {&lt;br /&gt; APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void pollTask(void)&lt;br /&gt;{&lt;br /&gt; if (pdPASS != xTaskCreate(vib_function, &amp;quot;VIB&amp;quot;, 260, NULL, 3, &amp;amp;vib_lf_task_handle))&lt;br /&gt; {&lt;br /&gt; APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307468?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:03:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2b6776d-15e1-4790-affc-bf2cb8a3187e</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;yes created successfully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307467?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9f817cc-a53f-41ce-ba8b-05449ef441e5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;would help to show the code for&amp;nbsp; BLETASK and poll TASK as well&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307466?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 12:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82002205-9acb-439b-8473-45d3debfe1a7</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;vTaskStartScheduler should never have returned. Are you sure that two of your tasks are sucessfully created?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307463?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:58:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:130e9f4b-2439-4df1-803b-9f23f2dd0e15</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for application main entry.
 */
int main(void)
 {
    bool erase_bonds;

    // Initialize modules.
    log_init();
    clock_init();
    
    flash_init();               /* Initialize the flash data storage */

    // Activate deep sleep mode.
    //SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;
    // Initialize modules.
    timers_init();
    // Configure and initialize the BLE stack.
    ble_stack_init();

    //buttons_leds_init(&amp;amp;erase_bonds);
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
    peer_manager_init();               /* Peer Manager initialization*/


    // Create a FreeRTOS task for the BLE stack.
    // The task will run advertising_start() before entering its loop.
    nrf_sdh_freertos_init(advertising_start, &amp;amp;erase_bonds);
        BLE_TASK();                   /* TASK-1*/

        pollTask();                   /*TASK-2*/


    NRF_LOG_INFO(&amp;quot;HRS FreeRTOS example started.&amp;quot;);
    // Start FreeRTOS scheduler.
    vTaskStartScheduler();

    for (;;)
    {
        APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN);
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting an error at&amp;nbsp; line number 43&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error 0x0f while running two tasks parallelly on ble_app_hrs_freertos.</title><link>https://devzone.nordicsemi.com/thread/307437?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5c40db8-125a-418a-bbaa-90c040006253</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]if run those two parallelly I&amp;#39;m getting error &lt;strong&gt;APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN); error code 0xf&lt;/strong&gt;.[/quote]
&lt;p&gt;&amp;nbsp;Where did you get this error exactly? I mean what was the context and what was the function that returned this error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>