STM32 using TouchGFX - Updating UI background image at runtime - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: May 20, 2024, 12:50:14 pm
content: ### OP QUESTIONS REFINED ###Hi,I am new to STM32 so this might seem a basic question... I am thinking of using one to interface to this round touch display:https://thepihut.com/products/3-4inch-dsi-round-touch-display-800x800and ideally use TouchGFX for the UI/code.The application is a simple vending machine. In a nutshell, this is the main functionality:- the unit in standby displays a static picture (an advert)and this picture needs to be updated by the local vending machine outlet through a USB pen drive or micro SD card (and needs to be a very simple process like insert the pen drive or uSD card then press a button to update)- when the user (the person who wants to buy something) touches the display the next screen is displayed and they select the quantity- then next screen appears prompting for payment and waiting for confirmation from the payment unit that the payment was succesfull- the good is then dispensedA couple of questions if someone could please help:- is it possible to change the background image at runtime? If so, how?- what format (file type) does the new image needs to be?Thank you as always!

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 20, 2024, 03:11:36 pm
content: Another question you have to ask yourself about this display, is how it is interfaced. By the looks of what information is given on the website you linked to, it uses the display connector of the Raspberry PI and that means mipi lanes if I'm not mistaken. Not sure which STM32 MCU supports these.About the touch panel information it states I2C and it depends a bit on the IC used in there how it needs to be handled. Since the board in the picture on the linked side has the Waveshare logo on it and there is a link to theproducton the site you might find more information there.

author: ricko_uk
author_rank: Super Contributor
timestamp: May 20, 2024, 07:28:52 pm
content: Thank you pcprogrammer,yes I checked and there are STM32 micros that have the DSI interface. But two people today mentioned that Raspberri Pi might have locked the display so it works only with the Pi products. Does anybody know whether that is correct?Thank you

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 21, 2024, 05:48:32 am
content: Quote from: ricko_uk on May 20, 2024, 07:28:52 pmDoubt that, but you never know. The PI will use it under Linux and the drivers for this display might well be open source, and if so it should be possible to port it to other systems.

author: dietert1
author_rank: Super Contributor
timestamp: May 21, 2024, 06:49:50 am
content: ST offer evaluation boards with a round display (STM32U5x9J-DKx). Didn't try but i assume their demo application uses TouchGFX and that would be good for learning and rapid prototyping. Their demos are open source.Regards, Dieter

author: ricko_uk
author_rank: Super Contributor
timestamp: May 21, 2024, 12:46:19 pm
content: Thank you both!Does anybody have any experience about the runtime image change and the format it has to be in?Thank you

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 21, 2024, 03:04:18 pm
content: Depends on the display library you are going to use and how the display wants the data formatted.Think of the different color schemes that exist, like RGB565 and RGB888. See:https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_color_formatsThe easiest is a standard bitmap because it does not need decoding or decompression, but it does take more space in memory.Loading an image to a display driven by an internal engine of the MCU is as easy as copying the data from one memory location to an other. For a display that is connected to, for instance a, SPI it means sending commands with data to the display.There is no simple, single cover it al, answer to this.