Question
FatFs f_open() hard fault
int main(void)
{
FATFS FatFs;
FIL fil;
FRESULT fr;
UINT bw;
fr = f_mount(&FatFs, "", 0);
if (fr != FR_OK) {
return (int)fr;
}
fr = f_open(&fil, "example.txt", FA_WRITE | FA_CREATE_ALWAYS);
if (fr != FR_OK) {
f_mount(NULL, "", 0);
return (int)fr;
}
f_close(&fil);
}
This is the main.c file. While running the code I get a hard fault issue at f_open.
I use SDIO mode SD 1 bit
Kindly help
