Hi Dialog,
基于我的应用程序,我需要创建多个线程,独立运行每个线程。例如,我有两项任务
1. LED has to blink for every 500 ms
2. Get one Pin Status whether its high or Low
I have used app_easy_timer() from ble but it needs BLE to be active.
How do i initialise a task , can you post a simple led blinking task.
Ragards,
BALAJI
Device:
Hi Balaji,
The app_easy_timer()is using the BLE Timer, so that’s why you can use that API in a BLE project. You could also use it to wakeup periodically. The SDK includes a blinky example without a BLE activity. It is under 6.0.14.1114\projects\target_apps\peripheral_examples\blinky SDk path.
Thanks, PM_Dialog
Hi Dialog,
It looks like i haven't asked my query correctly,
what I need is to create a Tasks ot threads with individual Id , call back function , timer value. and every task should be independent , its called multi-threading. I refered following links
http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/digital_in.html
http://lpccs-docs.dialog-semiciondiond.com/tutorial_sdk6/timer.html.
如果在DIS连接的情况下使用蓝牙连接或将LED亮起,它们已成为LED。它有效,所以我想到了在我的用户定义的函数中使用它。
Consider any ble project, when the code reaches user_app_init() function , i need to create two timers with a timer value , callback function. I tried it with above links , it works only when app_easy_timer() is called after ble connection, when i call it inside a user defined function then it don't works.
Attaching code which i made it has function called user_led_thread() , which has 10 seconds timeout and has to initiate a call back of LED toggle function mapped to it.
But it's not working , correct my code if I'm wrong.
Hi Dialog,
I have the above issue still not resolved. what is use of ke_task files , is it possible to create task using following API's
ke_task_init()
ke_task_create()
I need to create a application level task which is periodic without configuring hardware timers.
Thanks in advance !
Br,
Balaji
Hi Balaji,
I checked you attached code but to honest I am little bit confused. Could you please help me to understand what is your requirement? You mentioned “multi-threading” but in the DA145xx product family does not include a OS to support multi-threading.
Can you please run it in debug mode, add a breakpoint into led_blink_timer_cb(0 and check if the breakpoint hits?
If you could describe better what you would to accomplish it would be very helpful to understand your requirement and provide support.
Thanks, PM_Dialog
Hi Dialog,
Our Product is hand held BLE product, which usees three sensors characteristics inside a custom profile. The Sensor data is notified periodically. To process sensor data I'm configuring a hardware timer 0. How to execute these two things without masking ,it in a multi-thread environment.
Hi Balaji
Apologies for the delay. Could you please let us know if the last comment is related to your new forum ticket?
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/ultrasonic-interface-using-timer
Thanks, PM_Dialog
Hi Dialog,
Yes Both queries are inter-linked.
问候,
BALAJI
Hi Balaji,
Thanks for the update. Let’s continue the discussion in your new entered ticket ( I am working into that).
Thanks, PM_Dialog
Hi Dialog,
I have some clarifications with above thread
I refered following links
http://lpccs-docs.dialog-semiconductor.com/UM-B-119_DA14585-DA14531_SW_P...
http://lpccs-docs.dialog-semiconductor.com/UM-B-119_DA14585-DA14531_SW_P...
I need to know how to use Real time kernel available in BLE stack to create user application tasks.
Br,
BALAJI
Hi Balaji,
Could you please indicate what you are trying to implement? The DA145xx product family is not running an OS, like the DA146xx, so multitasking is not possible.
The SDK includes event driven kernel making application development easy. The kernel offers the following features:
● Task creation and state transition.
● Message exchange between tasks.
●定时器管理。
● Dynamic memory allocation.
● BLE events scheduling and handling.
The core of the kernel is a scheduler running in the main loop of the application. The scheduler checks if an event is set and services the pending events by calling the corresponding handler. The event may be a BLE or timer event, a message between two tasks.
The SDK provides the “app_easy_” APIs that should be used for the application development.
Thanks, PM_Dialog