2024-03-06 02:30 PM
Hello,
I'm starting a project with an STM32F429IIT6 MCU, but I have a doubt. The project will have a display (I haven't decided yet if it will be 4.3" or 7"), and I'll be controlling the display with the MCU's internal TFT controller using TouchGFX. So far, so good. The issue is that the device needs to be able to capture a screenshot of the screen and save it to an internal microSD. Is this possible, or should I use an external driver to achieve this?
Best Regards, Walter Paz.
Solved! Go to Solution.
2024-03-07 02:48 AM - edited 2024-04-03 01:06 AM
Hello @WPazH ,
As @Tesla DeLorean have said, you can simply fetch the frame buffer data.
There is no way for TouchGFX to get the information of the pixels displayed on the screen but if you configured your project properly, your screen should display exactly what is stored in the frame buffer.
You just need to know the starting address of your frame buffer and its size (its size should be the size of your screen in pixel multiplied by the depth of your pixels color [16bpp for RGB565, 24bpp for RGB888, 32bpp for ARGB8888]) and copy the raw data into a buffer.
Then you could use the libpng library to convert it into a png, libpng is already used in TouchGFX.
As per how to store it into your micoSD, I cannot help you as it is out of the scope of TouchGFX and of my qualifications.
However, here is an example of Creating a File System on a SD card on STM32 .
Regards,
2024-03-06 02:46 PM
As long as there aren't overlays you could likely fish the static image out of the frame buffer and write it to a bit map file. For BMP you'd need to handle the headers, and line ordering.
2024-03-07 02:48 AM - edited 2024-04-03 01:06 AM
Hello @WPazH ,
As @Tesla DeLorean have said, you can simply fetch the frame buffer data.
There is no way for TouchGFX to get the information of the pixels displayed on the screen but if you configured your project properly, your screen should display exactly what is stored in the frame buffer.
You just need to know the starting address of your frame buffer and its size (its size should be the size of your screen in pixel multiplied by the depth of your pixels color [16bpp for RGB565, 24bpp for RGB888, 32bpp for ARGB8888]) and copy the raw data into a buffer.
Then you could use the libpng library to convert it into a png, libpng is already used in TouchGFX.
As per how to store it into your micoSD, I cannot help you as it is out of the scope of TouchGFX and of my qualifications.
However, here is an example of Creating a File System on a SD card on STM32 .
Regards,
2024-03-07 02:51 AM
@WPazH wrote:the device needs to be able to capture a screenshot of the screen and save it to an internal microSD. .
That seems a rather odd requirement - why does it "need" (sic?) to do that?
There may be other ways to achieve the end goal ...
2024-03-19 02:10 AM
Hello @WPazH ,
Was any of the above comment helpful to you?
Were you able to succeed in your project?
Regards,