STM32F7 SDCard Open File After a specific number of files
Hello,
I am using STM32F746 MCU and trying to use SDCard in DMA mode using FatFS.
This MCU has Cache also so for any conflict between DMA and the cache, I have disabled the cache.
I am just trying to create files in an infinitive loop at startup. (Create, Write, Close, Increase File Name).
But after a while I am not able to create file and f_open() returns DISK_ERROR; It always returns error for the same file number.
If I create files with short file names, it take long time to have the error.
(For example; If file names length is 15, I am starting to have error after 1500th file, but the file names length is 150, having error after the 600th file ).
The format is FAT32 so I would expect to have 65K files in a directory.
What I see, if the file name is aroung 150, after the 600th file, I dont get DMA_Complete Callback(and timeouts) and when I ask the SDCard state using HAL_SD_GetCardState(), it returns HAL_SD_CARD_SENDING.
Any suggestion?
Thank you.