This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Got the problem with FFIND command

at first,I make a program that list all file in SD card with FFIND function.not using RTOS yet,it's work fine.

then,I using RTOS (use RTX) ,every fuction work fine (such as fopen,fclose,etc) except for FFIND) system will crash when it's reach the line with ffind command,all task stop running .

and, no compile error.

someone pls tell me how to solve the problem,thank in advance.

Parents Reply Children
  • Hi,dear Thank for your reply.

    There's only one task that use file I/O function.

    below is my program step,

    1. using FFIND to list "*.mp3" file
    2. use FOPEN
    3. use FGET to get data and send to mp3 module
    4. FCLOSE when file end

    my program crash at FFIND command (if I deleted FFIND line, it worked fine)

  • Seems to me that you need more stack for the File I/O task. How much stack did you allocate for this task?

    Try with stack size of 0x400 (1k Byte). You may reduce the size later till the application still works stable.

    You know that sizeof (struct FINFO) = 48 bytes.

    Franc