669 views
in System Integration by
Hello,

I am evaluating the free version and still thinking how to integrate the UI app best with underlying system, running FreeRTOS. In the examples provided it seems that data from worker tasks is passed via public RAM allocation in DeviceDriver.c, so one task updated static vars, then DeviceDriver_ProcessData() will pass it along in the gui task.

So i will need one task that waits os messages from other tasks and route it via public ram, or insert osMessageGet() directly into the DeviceDriver_ProcessData(), but this function will stall the code for some time while waiting and probably slow UI repaint. From what i see in the code EwBspWaitForSystemEvent() is the only function that releases execution in the GUI task, and the sleep time is very, very dynamic (if my debug print is correct). So maybe not such a good idea to stall the GUI task for const time everytime it gets execution time from the os.

Should i re-implement the osMessageGet() from cmsis_os.c and tightly integrate into the gui task loop ? Or maybe you have that done already and i missed it ?

Any advice please, thank you!

K.

1 Answer

0 votes
by

Hi K.,

I also have started evaluating Embedded Wizard with FreeRTOS a few weeks ago, maybe I could help you too. Rapidly I figured out how the data processing within the device driver functions works, same as you. The most important thing to know is that DeviceDriver_ProcessData() has its function in fetching and processing data that doesn't cause waiting states. Within this function you should not do stuff that needs to long. This may cause waiting states that will cause a low performance of your user interface.

I don't know what you exactly mean with the osMessageGet(), but I haven't found any FreeRTOS dedicated code in Embedded Wizard runtime environment and generated code. This UI solution also can work as bare metal, so I think the focus is to avoid too much dependendies to FreeRTOS.

All in all, that sounds more like a FreeRTOS specific thing for me. Maybe the FreeRTOS community could give you advise too.

Greetings,


Fridolin

by

Hello,

Thanks for your response. Yeah, it is clear that you can't stall the code too much in the DeviceDriver_ProcessData() . I asked this because it was mentioned somewhere in the EW documentation that if you use Rtos, you should maybe use messaging between tasks, instead of public vars that just sit there, statically allocated all the time. So i was wondering if there is an example already available, instead of me messing around with the already highly optimised and tested GUI task.

The CMSIS OS is standard wrapper for different operating system, it provides common interface for os functions, all MCU manufacturers usually supply it with their SDK releases.

K.

 

by
Hi there,

exactly for that case it isn't a dedicated example in our Build Environment included. Embedded Wizard generally was optimized for FreeRTOS, but this does not include an artificial second task to show how the data exchange works proper. FreeRTOS is already well documented, therefore and as reason of that FreeRTOS is not an essential part of our solution, it could be that additional information about FreeRTOS have to read in the FreeRTOS documention.

Our FreeRTOS implementation is just focused on the UI task, so sorry for that.

If you have any other question, please feel free to ask.

Regards,

Tim
by
Hey Tim,

Thanks for your input! No problem for me to implement it either way. It is just a case of not given a clear requirements by managment, so i try to think of the best way, in case data usage gets too big.

BR, K.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...