Hi all, I'm working with stm32f7 custom board and px4 firmware, but my concerns are with the NuttX FAT32 driver. I have an issue. PX4 logger module writes high rate data to SD card successfully awhile, until at some point write func return error 28 (“No space left on device”) while there is a lot of free space on a card (29GB out of 30GB).
I had this error several times on two different SD-cards. I don't do a lot of tests, but it seems that SanDisk Extreme Pro is less prone - it can write 100+ Mbytes files without errors, while SanDisk Extreme usually breaks a little earlier. The board is on the table, no vibrations (at least any significant). I dig a little and can see that 'fat_write' try to extend the current cluster by one calling 'fat_extendchain' func that on existing chain extending verifies that this is a valid cluster by examining its start sector, but 'startsector = fat_getcluster(fs, cluster);' returns 0: else if (startsector < 2) { /* Oops.. this cluster does not exist. */ return 0; } In 'fs_buffer' there is indeed 0 for this fatindex (see picture). [image: изображение.png] I didn't dig much in the driver and fat32 itself. What should I check, where it is useful to set breakpoints, etc.? Can any hardware issues be the reason for such error theoretically? Can any previous power shutdown and unfinished writings (in fact shutdowns can be on every launch and I already have several corrupted files), breaks FAT system itself in that way it can lead to this exact error for new sessions? Thanks in advance for any help! --- With regards, Oleg.