eclipse-threadx/filex

Fault tolerance failing on 2nd iteration of fx_write_file

Closed this issue · 0 comments

On the first pass of a 1MB file, fx_file_write is able to successfully write 1MB to a file. On the 2nd pass, it fails, specifically at _fx_utility_FAT_entry_read -> media_ptr -> fx_media_fat_cache.

ULONG fx_fat_cache_entry_cluster -> This value is always 749
ULONG fx_fat_cache_entry_value -> 0
ULONG fx_fat_cache_entry_dirty -> 0

I have enabled fault tolerance. It is consistent too so I have a feeling it's my configuration. I have a SPI NOR Flash with 4MB of space. Using baremetal, this write passes every time. If I enable fault tolerance, it fails. Without it though, it passes.

Please let me know what you need from me to solve this.