Skip to main content
Associate II
March 20, 2024
Solved

STM 32 Touch GFX SD card

  • March 20, 2024
  • 5 replies
  • 1534 views

I need to read data from SD card and then send them via uart in STM32f7 discovery kit. so I did the initial setting such as open the text file using fatfs and then inside a while loop I read the data. but I need to execute that when I press fetch button in my UI, but suddenly all fall apart, I don't know exact reason is it because of interrupt of the SDMMC or is there a way to do it safely.

 

This topic has been closed for replies.
Best answer by LouisB

Hello @sasmithadilshan ,

The makefiles from CubeIDE and Tgfx Designer are different, try to modify <YOUR_PROJECT>/gcc/MakeFile or put your files in  <YOUR_PROJECT>/TouchGFX/target.
Also refer to Using Non-Memory Mapped Flash for Storing Images | TouchGFX Documentation for reading image in a SD card.

Like @SofLit suggested, debugging may help you.

I hope it helps,

Regards,

5 replies

mƎALLEm
Technical Moderator
March 20, 2024

You need to debug your application. Put breakpoints where you suspect an issue. Start by debugging your application from Model.cpp file.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Associate II
March 20, 2024

can we just normally code without considering interrupt and other things, is RTOS handle those? can you give me some example stript to just load some data from SD card using a button click in UI, I would be much helpful for me, If you have time. :smiling_face_with_smiling_eyes:

Associate II
March 20, 2024

without even coding anything i just setup the SDMMC and FATFS and then with my working code that's for UI, I tried just uploading it. screen goes crazy when doing that, I not even code any thing just updated ioc and regenerated the code 

 

Associate II
March 20, 2024

after sd card modeafter sd card modewhat it should bewhat it should becube ide build fine , but in toughgfx its not workingcube ide build fine , but in toughgfx its not working

LouisBBest answer
ST Employee
March 25, 2024

Hello @sasmithadilshan ,

The makefiles from CubeIDE and Tgfx Designer are different, try to modify <YOUR_PROJECT>/gcc/MakeFile or put your files in  <YOUR_PROJECT>/TouchGFX/target.
Also refer to Using Non-Memory Mapped Flash for Storing Images | TouchGFX Documentation for reading image in a SD card.

Like @SofLit suggested, debugging may help you.

I hope it helps,

Regards,

Osman SOYKURT
Technical Moderator
April 26, 2024

Hello @sasmithadilshan ,

Have you tried to modify the other makefile as suggested by @LouisB? Did you manage to solve your issue?

Osman SOYKURTST Software Developer | TouchGFX