2021-03-30 05:25 AM
Hi.
I am using a Discovery kit F769I Disco and its included touchscreen.
I am struggling to write and read data from an external SD Card using TouchGFX. Indeed, I want to create an interaction using 2 buttons where it either creates a text file on my sd and writes data in it or reads data from an existing text file.
So far, this has worked using the Simulator because it doesn't use the microSD card.
However, it doesn't work when I run the code on the board : I am using the flow operators (>>) to write and read data.
I tried writing and reading data only using STM32CubeIDE (without the graphical interface) and it works because I am using the functions present in the FATFS library.
How could I make it work in TouchGFX ?
Thank you for reading.
2021-03-30 07:00 AM
Hi,
I think you can find older post on the forum or online of people working with SD cards to achieve something similar, it rings a bell. You can also have a look at the backend communication article in the documentation to understand how to interact between your UI (buttons) and the logic of your project.
/Romain
2021-03-30 07:09 AM
I have searched for "sd card touch gfx" but honestly I couldn't find a post. Do you have any references ?
I will take a look at the backend article.
Thanks for your help.
2021-04-01 05:16 AM
Well, it doesn't really relate to Touchgfx, Touchgfx and SD card are two independent modules. You can have them without any problem. The matter is I wonder if you like to use CPP-like functions as you mentioned "I am using the flow operators (>>) to write and read data". If so, you are about to implement FAT in CPP on your own since FATFS is implemented in pure C (Some assembly is ....).