Jump to content

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

hi thanks for reply but do you mind to give some hint, debug for ?....

What should I do when I am doing debugging in stuck into gfxHalt, what should I do after I encounter halt ?

 

 

 

 

Posted

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
    }
}

 

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