Jump to content

FATFS ON STM32F7 BAREMETAL


manoj

Recommended Posts

Hii all, I got my fatfs working but when I try sample code it always goes and stuck gfxHalt(), 

i tried two type gfx.conf but not working 

First Time :

#define GFILE_FATFS_EXTERNAL_LIB TRUE 
#define GFILE_NEED_NOAUTOMOUNT		TRUE
#define GFILE_NEED_PRINTG			TRUE

Second Time :

#define GFILE_NEED_FATFS			TRUE
#define GFILE_NEED_NOAUTOMOUNT		TRUE
#define GFILE_NEED_PRINTG			TRUE

Both ways It ugfx FATFS DEMO don't work for me, I am doing wrong anywhere ? 

Edited by manoj
correct some missed words
Link to comment
Share on other sites

Time #1: GFILE_NEED_FATFS needs to be TRUE even if you are using GFILE_FATFS_EXTERNAL_LIB.

Other than that you need to debug to find where gfxHalt is being called. gfxHalt is only called by uGFX when it detects you (or the hardware) have done something very wrong.

Link to comment
Share on other sites

Hi @Joel Bodenmann and @inmarket

 

is this is a spelling error below at the if condition you spell it as logfile in small cap but then the GFILE object is logFile ?

 

void LogInfo(const char* msg) {
    GFILE* logFile;
    
    logFile = gfileOpen("info.txt", "a");        // Open the file for append
    if (logfile) {
        gfileWrite(logFile, msg, strlen(msg));
        gfileClose(logFile);                    // Close the file again
    }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...