TASK_APP and TASK_GTL coexistance

2 posts / 0 new
Last post
Last seen: 1 min 14 sec ago
Joined: 2017-05-25 06:51
TASK_APP and TASK_GTL coexistance

Hi Dialog Team,

I am working on DA14585 with external host mode, and BLE in scanner/observed mode configuration. I am using ST32F4 for external host with UART interface.

I want to add additional functionalities on BLE upon special requests from host.
I had posted similar issue here

Since I haven't received any solution on that, I am thinking if I can have APP_TASK and GTL_TASK coexist. By this approach I was thinking that
commands can be sent, and If I can reroute
response can be rerouted as

By this I can achieve my custom tasks as well, where there is no BLE stack intervention
MCU(GTL_TASK)------------->BLE(APP_TASK) for LED blink
BLE(APP_TASK)---------------->MCU(GTL_TASK) for gpio_read

Please let me know if this is realizable, and some pointers for the same.

Looking forward for immediate help.

Thanks in advance!

Last seen: 19 hours 57 min ago
Joined: 2018-02-08 11:03
Hi Nishal,

Hi Nishal,

The procedure that you have described realizable and thanks for your information. Let me share you same tips might help you:

  1. In the ROM configuration table, rom_cfg_table_var of the jump_table. C file you should add the TASK_APP and then you should accomplish what you mentioned in your post.


ke_task_id_t prf_get_task_from_id_func(ke_msg_id_t id)



TASK_APP,                               // 11. app_main_task_pos




You should midify the prf_get_task_from_id_func as below. Otherwise, to will get an UNKNOWN_TASK error.


ke_task_id_t prf_get_task_from_id_func(ke_msg_id_t id)


    ke_task_id_t task = TASK_NONE;

    uint8_t idx = KE_IDX_GET(id);

    uint8_t i;

    id = KE_TYPE_GET(id);


    // find if profile present in profile tasks

    for(i = 0; i < BLE_NB_PROFILES ; i++)


        // check if profile identifier is known

        if(prf_env.prf[i].id == id)


            task = prf_env.prf[i].task;





    if (id == TASK_ID_APP)


        task = TASK_APP;



    return KE_BUILD_ID(task, idx);



Thanks, PM_Dialog