1
votes


I am programming the STM32F0 (Keil uVision 5).

I've tried to use FatFs library to manage a file system (SD card). I've writen every initialization functions and the project is compiling without any errors / warnings. But first function f_mount doesn't work properly. The function call is:

const char sciezka = '0' ;
FATFS *fs = (void *) 0;
fresult= f_mount (fs, &sciezka, 1);

Function doesn't even reach the line with disk_initialize. And I get fresult "FR_NOT_ENABLED" (f_mount -> find_volume : : : : : after line fs = FatFs [vol] fs pointer is still NULL).

FatFs library with the examples is on the fatFs website : http://elm-chan.org/fsw/ff/en/mount.html

Please tell me what I should do with it.

1
Was your problem solved? I am having same problem with f_mount function. - Naasif

1 Answers

3
votes

Your FAFTS variable is a null pointer. Use a local variable. Like this.

FATFS fs;
f_mount(&fs, "0:", 1);