Resolved! I can only write to SD card once (SPI-fatfs)
I am using a stm32f407 and i use this code inside a loop:/* Mount SD Card */ if(f_mount(&fs, "", 0) != FR_OK) _Error_Handler(__FILE__, __LINE__); /* Open file to write */ if(f_open(&fil, "first.txt", FA_OPEN_ALWAYS | FA_READ | FA_WRITE) ...