Author Topic: STM32 using TouchGFX - Updating UI background image at runtime  (Read 514 times)

0 Members and 1 Guest are viewing this topic.

Online ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1027
  • Country: gb
### 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-800x800   
and 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 dispensed

A 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! :)

« Last Edit: May 21, 2024, 12:47:05 pm by ricko_uk »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: nl
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #1 on: May 20, 2024, 03:11:36 pm »
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 the product on the site you might find more information there.

Online ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1027
  • Country: gb
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #2 on: May 20, 2024, 07:28:52 pm »
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 :)
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: nl
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #3 on: May 21, 2024, 05:48:32 am »
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?

Doubt 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.

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2197
  • Country: br
    • CADT Homepage
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #4 on: May 21, 2024, 06:49:50 am »
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
 
The following users thanked this post: ricko_uk

Online ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1027
  • Country: gb
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #5 on: May 21, 2024, 12:46:19 pm »
Thank you both!

Does anybody have any experience about the runtime image change and the format it has to be in?

Thank you

 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: nl
Re: STM32 using TouchGFX - Updating UI background image at runtime
« Reply #6 on: May 21, 2024, 03:04:18 pm »
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_formats

The 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.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf