⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
DanyloVodopianov
Offline
Last seen:6 months 2 weeks ago
Joined:2019-09-30 19:35
Multitasking

Hi, i bought your board and start ti investigate your SDK

Can you provide to me some examples with creating multitasking project

Device:
PM_Dialog
Offline
Last seen:10 hours 14 min ago
Staff
Joined:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

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. Please take a look at section 5 Real Time Kernel ofUM-B-051 : DA14580 Software Platform Reference (SDK5)document.

The DA1468x/ DA1469x are based on a real-time preemptive Operating System named FreeRTOS which has multitasking capabilities. To do so, in case of DA14580 and SDK5, can you please clarify a bit more what you are trying to accomplish with the “multitasking”?

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:6 months 2 weeks ago
Joined:2019-09-30 19:35
I worked previous with

I worked previous with freertos, but never with kernel. I just want to understand how to create sync and async tasks, message exchanging and so on. I need to get base knowledges

PM_Dialog
Offline
Last seen:10 hours 14 min ago
Staff
Joined:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

The Kernel is a very simple scheduler and it does not provide the same capabilities with FreeRTOS. For getting started, you can refer to UM-B-051 document as it was mentioned in my previous reply.

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:6 months 2 weeks ago
Joined:2019-09-30 19:35
Thanks, i read documentation,

Thanks, i read documentation, but i still can't understand why it doesn't work for me.

Can you tell me what i do wrong. In main after system_init() function i call my init function(cust_task_init()), in this function i call ke_task_create(TASK_ID_CUSTS1, TASK_DESC_CUSTS) and ke_task_state(TASK_ID_CUSTS1, TASK_RUN). In TASK_DESC_APP i put my custom handler. TASK_RUN it is enumeration which is equal 1.

As far i understand event must call this handler with some event and i can't understand how to create event.

For example:

When i get data from UART i need call this handler, which get uart data and turn on LED if it 1 and turn off if data is 0.

Can you tell me step by step what i need to do in prox_reporter example projects?

Thank you

PM_Dialog
Offline
Last seen:10 hours 14 min ago
Staff
Joined:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

The SDK provides couple of APIs to start developing your own application. You should not create tasks and handlers by yourself. Regarding the UART read, please check the uart2_async project which is located under 5.0.4\projects\target_apps\peripheral_examples SDK path. Also, regarding the LED blinking, please refer to Blinky example which is in the same SDK path.

In case of pxp_reporter, the things are more complicated as this project includes BLE activity and sleep mode configuration. Please notice that in any of sleep mode, all the peripherals are powered down, including UART2. This means that you are not able to have any UART activity when in sleep mode. So, please clarify a bit more what you are truing to accomplish.

If you are starting a new design or project, we would recommend to start with the DA14585 – the SDK is much improved, we have a lot of code examples, and there is also software roadmap support on the DA14585 to our next generation device that is announced 5th November

Thanks, PM_Dialog