Skip to main content
BParh.1
Senior III
May 17, 2021
Solved

TouchGFX: How to implement 2-way Task Communication of GUI task and other?

  • May 17, 2021
  • 4 replies
  • 2138 views

So I am trying to implement:

  1. When user insert USB Stick, the display show USB stick icon
  2. User then able to click the icon and chose option to log the real life time data displayed by the dynamic graph.

This means I need to:

  1. Send message from USB Host task to GUI task (i.e. TouchGFX_Task) to indicate the USB stick has been connected/disconnected
  2. Send message from GUI task to USB Host task of request to log the data into USB stick.

Can someone give me some pointer please how to implement this 2-way communication? A sample would be great.

This topic has been closed for replies.
Best answer by MM..1

Simple way use global variable state and case it in both tasks.

More multicore oriented is use mesage queues. Backend Communication | TouchGFX Documentation

4 replies

MM..1
MM..1Best answer
Chief III
May 19, 2021

Simple way use global variable state and case it in both tasks.

More multicore oriented is use mesage queues. Backend Communication | TouchGFX Documentation

BParh.1
BParh.1Author
Senior III
May 20, 2021

Thank you @MM..1​ , this what I was looking for

Backend Communication | TouchGFX Documentation

Alexandre RENOUX
Visitor II
May 20, 2021

Hello BParh.1,

I also made a document explaining Backend Communication. Maybe it will also help you ^^

/Alexandre

wired
Senior II
December 30, 2021

Alexandre,

This is quite possibly the most useful document I have seen related to TouchGFX. It is much better than trying to follow the online documentation. I stumbled across this accidentally while looking for some other information, and immediately downloaded it to my design documentation folder. Maybe this is easily found somewhere else, but I have not run across it in 2 months of using TouchGFX.

I HIGHLY RECOMMEND that a sticky thread be placed at the top of the TouchGFX Q&A with the title "BACKEND COMMUNICATION TO GUI - WITH OR WITHOUT OS" and that this document be in the first post.

P.S. - You are a great communicator. The information was very clearly presented. If you have produced other TouchGFX documents like this one, please share!

BParh.1
BParh.1Author
Senior III
May 20, 2021

Sweetttttt, thank you @Alexandre RENOUX​ , definitely help :grinning_face: .

I love this community hehehhe