Friday, April 20th 2018, 12:44pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

pdmorrow

Beginner

Date of registration: Mar 20th 2018

Posts: 4

1

Saturday, April 7th 2018, 1:13pm

Multi-task RTOS usage

Hello,

I've putting a system together which has a number of RTOS (FreeRTOS 9.0.1) tasks running, a single task is dedicated to the GUI which calls GUI_Delay() every 20ms. This task also creates all windows at system startup time and switches to different windows based on user touch input. Now I've got another RTOS task which is processing some data from an external source (ADC), I need to update a table with some data in this task, i.e.

Task 1 - Creates a pile of widgets (specifically a listview), runs GUI_Delay() every 20ms.
Task 2 - Deals with data from an external source (ADC) every second or so.

I would like to be able to add data to the listview (created in task 1) from task 2. Howver it seems the UI is not being updated, if I run a test and add data to the listview from task 1 (i.e. the same task that created the widget) it works OK. Is there a restriction where widgets can only be updated from the task they are created in? I'm hoping this is not the case otherwise I'll need to queue events myself back to task 1.

I've implemented all the usual RTOS routines in GUI_X_OS.c and the version of emWin definitely has been compiled with OS support.

Thanks,
Peter.

N.B. This is STemWin v 5.4.0 - we are planning on moving to emWin asap.

pdmorrow

Beginner

Date of registration: Mar 20th 2018

Posts: 4

2

Sunday, April 8th 2018, 10:12am

Oh dear, please ignore my question - it's all working as expected :) Stupid programming error on my part.