[FRDM-KW38] Integrate time-based tasks with the BLE stack

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[FRDM-KW38] Integrate time-based tasks with the BLE stack

Jump to solution
998 Views
rahme
Contributor II

Hi everyone,

I have a sequencer which will schedule tasks in time, e.g run task0 every 50ms, task1 every 70ms and so on.

Is it possible to achieve this along with the BLE task (main_task) from nxp ble demos without compromising the mcu going into deep sleep of course?

What is the best way to achieve this?

I tried to create a seperate task using the OSA_TaskCreate but it seems to break the BLE task.

Any help is appreciated. Many thanks.

0 Kudos
1 Solution
982 Views
nxf56274
NXP Employee
NXP Employee

Hi,

One easy way is to use timer to realize the function. Use TMR_StartLowPowerTimer to start the specified function. The ble demo has many tasks using the timer. If you want to use the os, you need to increase the os stack. The macro 'gTotalHeapSize_c' is defined in app_preinclude.h. But I recommend you use the timer.

View solution in original post

0 Kudos
2 Replies
983 Views
nxf56274
NXP Employee
NXP Employee

Hi,

One easy way is to use timer to realize the function. Use TMR_StartLowPowerTimer to start the specified function. The ble demo has many tasks using the timer. If you want to use the os, you need to increase the os stack. The macro 'gTotalHeapSize_c' is defined in app_preinclude.h. But I recommend you use the timer.

0 Kudos
972 Views
rahme
Contributor II

Thank you for your reply.

In fact, this is what we end up using.

Have a nice day.

0 Kudos